Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dex
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
dex
Commits
05e8d50e
Commit
05e8d50e
authored
Jul 31, 2017
by
rithu leena john
Committed by
GitHub
Jul 31, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1000 from rithujohn191/fix-hosted-domain
connector/oidc: fix hosted domain support.
parents
a0010d0f
5e0bf8b6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
oidc.go
connector/oidc/oidc.go
+2
-2
config-dev.yaml
examples/config-dev.yaml
+2
-1
No files found.
connector/oidc/oidc.go
View file @
05e8d50e
...
...
@@ -35,7 +35,7 @@ type Config struct {
// Optional list of whitelisted domains when using Google
// If this field is nonempty, only users from a listed domain will be allowed to log in
HostedDomains
[]
string
`json:"hostedDomain"`
HostedDomains
[]
string
`json:"hostedDomain
s
"`
}
// Domains that don't support basic auth. golang.org/x/oauth2 has an internal
...
...
@@ -198,7 +198,7 @@ func (c *oidcConnector) HandleCallback(s connector.Scopes, r *http.Request) (ide
if
len
(
c
.
hostedDomains
)
>
0
{
found
:=
false
for
_
,
domain
:=
range
c
.
hostedDomains
{
if
claims
.
HostedDomain
!
=
domain
{
if
claims
.
HostedDomain
=
=
domain
{
found
=
true
break
}
...
...
examples/config-dev.yaml
View file @
05e8d50e
...
...
@@ -67,7 +67,8 @@ connectors:
# clientID: $GOOGLE_CLIENT_ID
# clientSecret: $GOOGLE_CLIENT_SECRET
# redirectURI: http://127.0.0.1:5556/dex/callback
# hostedDomain: $GOOGLE_HOSTED_DOMAIN
# hostedDomains:
# - $GOOGLE_HOSTED_DOMAIN
# Let dex keep a list of passwords which can be used to login to dex.
enablePasswordDB
:
true
...
...
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