Skip to content

Commit

Permalink
Merge branch 'adfs_get_username' of github.com:simongottschlag/vouch-…
Browse files Browse the repository at this point in the history
…proxy into simongottschlag-adfs_get_username
  • Loading branch information
bnfinet committed Feb 13, 2019
2 parents 1328338 + ed8ef3b commit 8bba8c1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pkg/cfg/cfg.go
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,9 @@ func setDefaults() {
} else if GenOAuth.Provider == Providers.GitHub {
setDefaultsGitHub()
configureOAuthClient()
} else if GenOAuth.Provider == Providers.ADFS {
setDefaultsADFS()
configureOAuthClient()
} else {
configureOAuthClient()
}
Expand All @@ -431,6 +434,11 @@ func setDefaultsGoogle() {
}
}

func setDefaultsADFS() {
log.Info("configuring ADFS OAuth")
OAuthopts = oauth2.SetAuthURLParam("resource", GenOAuth.RedirectURL) // Needed or all claims won't be included
}

func setDefaultsGitHub() {
// log.Info("configuring GitHub OAuth")
if GenOAuth.AuthURL == "" {
Expand Down

0 comments on commit 8bba8c1

Please sign in to comment.