Skip to content
Snippets Groups Projects
Commit 425b69c6 authored by Demian Katz's avatar Demian Katz Committed by Robert Lange
Browse files

Fix whitespace.

parent c2ff51b3
Branches
Tags
No related merge requests found
...@@ -466,14 +466,14 @@ class Folio extends AbstractAPI implements ...@@ -466,14 +466,14 @@ class Folio extends AbstractAPI implements
throw new ILSException("User not found"); throw new ILSException("User not found");
} }
$profile = $json->users[0]; $profile = $json->users[0];
$credentials = [ $credentials = [
'userId' => $profile->id, 'userId' => $profile->id,
'username' => $username, 'username' => $username,
'password' => $password, 'password' => $password,
]; ];
// Get token // Get token
try { try {
$response = $this->makeRequest( $response = $this->makeRequest(
'POST', 'POST',
'/authn/login', '/authn/login',
json_encode($credentials) json_encode($credentials)
...@@ -481,11 +481,11 @@ class Folio extends AbstractAPI implements ...@@ -481,11 +481,11 @@ class Folio extends AbstractAPI implements
// Replace admin with user as tenant // Replace admin with user as tenant
$this->token = $response->getHeaders()->get('X-Okapi-Token') $this->token = $response->getHeaders()->get('X-Okapi-Token')
->getFieldValue(); ->getFieldValue();
$this->debug( $this->debug(
'User logged in. User: ' . $username . '.' . 'User logged in. User: ' . $username . '.' .
' Token: ' . substr($this->token, 0, 30) . '...' ' Token: ' . substr($this->token, 0, 30) . '...'
); );
return [ return [
'id' => $profile->id, 'id' => $profile->id,
'username' => $username, 'username' => $username,
'cat_username' => $username, 'cat_username' => $username,
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment