Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openid_connect-3257822
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Issue forks
openid_connect-3257822
Commits
0199dfee
Commit
0199dfee
authored
3 years ago
by
João Ventura
Committed by
Joao Ventura
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3166501
by jcnventura: Support authorization_code flow without id_token
parent
21bd2ae2
No related branches found
Branches containing commit
Tags
2.0.0-alpha6
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/OpenIDConnect.php
+14
-3
14 additions, 3 deletions
src/OpenIDConnect.php
with
14 additions
and
3 deletions
src/OpenIDConnect.php
+
14
−
3
View file @
0199dfee
...
...
@@ -243,9 +243,20 @@ class OpenIDConnect {
*/
private
function
buildContext
(
OpenIDConnectClientEntityInterface
$client
,
array
$tokens
)
{
$plugin
=
$client
->
getPlugin
();
$user_data
=
$tokens
[
'id_token'
]
??
[];
$access_data
=
$tokens
[
'access_token'
]
??
[];
$userinfo
=
$plugin
->
usesUserInfo
()
?
$plugin
->
retrieveUserInfo
(
$tokens
[
'access_token'
])
:
array_merge
(
$access_data
,
$user_data
);
$user_data
=
$tokens
[
'id_token'
];
$access_data
=
$tokens
[
'access_token'
];
if
(
$plugin
->
usesUserInfo
())
{
$userinfo
=
$plugin
->
retrieveUserInfo
(
$tokens
[
'access_token'
]);
}
elseif
(
is_array
(
$user_data
))
{
$userinfo
=
$user_data
;
}
elseif
(
is_array
(
$access_data
))
{
$userinfo
=
$access_data
;
}
else
{
$userinfo
=
[];
}
$provider
=
$client
->
getPluginId
();
$context
=
[
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment