Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
project
openid_connect
Commits
8de674f9
Commit
8de674f9
authored
Jan 13, 2016
by
yaslama
Committed by
sanduhrs
Jan 13, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#2642734
by yaslama: Support no expires_in field in the access_token
parent
c91679d9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
src/Plugin/OpenIDConnectClientBase.php
src/Plugin/OpenIDConnectClientBase.php
+5
-3
No files found.
src/Plugin/OpenIDConnectClientBase.php
View file @
8de674f9
...
...
@@ -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
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment