Skip to content

Commit

Permalink
Merge pull request #11235 from liggitt/warn-no-idps
Browse files Browse the repository at this point in the history
Merged by openshift-bot
  • Loading branch information
OpenShift Bot authored Oct 10, 2016
2 parents 606716e + 66ef1db commit 88a2e30
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/cmd/server/api/validation/oauth.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ func ValidateOAuthConfig(config *api.OAuthConfig, fldPath *field.Path) Validatio
}
}

if len(redirectingIdentityProviders) == 0 {
validationResults.AddWarnings(field.Invalid(fldPath.Child("identityProviders"), "login", "no identity providers are configured to handle logins"))
}
if len(challengeRedirectingIdentityProviders) > 1 {
validationResults.AddErrors(field.Invalid(fldPath.Child("identityProviders"), "challenge", fmt.Sprintf("only one identity provider can redirect clients requesting an authentication challenge, found: %v", strings.Join(challengeRedirectingIdentityProviders, ", "))))
}
Expand Down

0 comments on commit 88a2e30

Please sign in to comment.