Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dex
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hdacloud
dex
Commits
04949933
Commit
04949933
authored
4 years ago
by
Rui Yang
Browse files
Options
Downloads
Patches
Plain Diff
update oidc documentation and email claim err msg
Signed-off-by:
Rui Yang
<
ruiya@vmware.com
>
parent
41207ba2
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Documentation/connectors/oidc.md
+6
-13
6 additions, 13 deletions
Documentation/connectors/oidc.md
connector/oidc/oidc.go
+1
-1
1 addition, 1 deletion
connector/oidc/oidc.go
with
7 additions
and
14 deletions
Documentation/connectors/oidc.md
+
6
−
13
View file @
04949933
...
@@ -78,28 +78,21 @@ connectors:
...
@@ -78,28 +78,21 @@ connectors:
# promptType: consent
# promptType: consent
# Some providers return no standard claim that is different to
# Some providers return non-standard claims (eg. mail).
# claims list at https://openid.net/specs/openid-connect-core-1_0.html#Claims
# Use claimMapping to map those claims to standard claims:
# Use claimMapping to specify custom claim names
# https://openid.net/specs/openid-connect-core-1_0.html#Claims
# claimMapping can only map a non-standard claim to a standard one if it's not returned in the id_token.
claimMapping
:
claimMapping
:
# The set claim is used as user id.
# Default: sub
# user_id: nickname
# The set claim is used as user name.
# Default: name
# user_name: nickname
# The set claim is used as preferred username.
# The set claim is used as preferred username.
# Default: preferred_username
# Default: preferred_username
# preferred_username: other_user_name
# preferred_username: other_user_name
# The set claim is used as email.
# The set claim is used as email.
# Default:
"
email
"
# Default: email
# email: mail
# email: mail
# The set claim is used as groups.
# The set claim is used as groups.
# Default:
"
groups
"
# Default: groups
# groups: "cognito:groups"
# groups: "cognito:groups"
```
```
...
...
This diff is collapsed.
Click to expand it.
connector/oidc/oidc.go
+
1
−
1
View file @
04949933
...
@@ -330,7 +330,7 @@ func (c *oidcConnector) createIdentity(ctx context.Context, identity connector.I
...
@@ -330,7 +330,7 @@ func (c *oidcConnector) createIdentity(ctx context.Context, identity connector.I
}
}
if
!
found
&&
hasEmailScope
{
if
!
found
&&
hasEmailScope
{
return
identity
,
fmt
.
Errorf
(
"missing
\"
%s
\"
claim
"
,
emailKey
)
return
identity
,
fmt
.
Errorf
(
"missing
email claim, not found
\"
%s
\"
key
"
,
emailKey
)
}
}
emailVerified
,
found
:=
claims
[
"email_verified"
]
.
(
bool
)
emailVerified
,
found
:=
claims
[
"email_verified"
]
.
(
bool
)
...
...
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