Commit 8de674f9 authored by yaslama's avatar yaslama Committed by sanduhrs

Issue #2642734 by yaslama: Support no expires_in field in the access_token

parent c91679d9
......@@ -202,12 +202,14 @@ abstract class OpenIDConnectClientBase extends PluginBase implements OpenIDConne
$response_data = json_decode((string) $response->getBody(), TRUE);
// Expected result.
$result = array(
$tokens = array(
'id_token' => $response_data['id_token'],
'access_token' => $response_data['access_token'],
'expire' => REQUEST_TIME + $response_data['expires_in'],
);
return $result;
if (array_key_exists('expires_in', $response_data)) {
$tokens['expire'] = REQUEST_TIME + $response_data['expires_in'];
}
return $tokens;
}
catch (Exception $e) {
$variables = array(
......
Markdown is supported
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