mirror of
https://github.com/smallstep/certificates.git
synced 2024-11-11 07:11:00 +00:00
feat: remove custom hardcoded OIDC challenge for Google
This commit is contained in:
parent
2be77385f6
commit
6ffd913e28
@ -411,17 +411,8 @@ func wireOIDC01Validate(ctx context.Context, ch *Challenge, db DB, jwk *jose.JSO
|
||||
"keyAuthorization does not match; expected %s, but got %s", expectedKeyAuth, wireChallengePayload.KeyAuth))
|
||||
}
|
||||
|
||||
if claims.Issuer == "https://accounts.google.com" {
|
||||
// for internal demo purpose only
|
||||
var handle = fmt.Sprintf("im:wireapp=%s_wire", strings.ToLower(claims.GivenName))
|
||||
var displayName = claims.Handle
|
||||
if challengeValues.Name != displayName || challengeValues.Handle != handle {
|
||||
return storeError(ctx, db, ch, false, NewError(ErrorRejectedIdentifierType, "OIDC claims don't match"))
|
||||
}
|
||||
} else {
|
||||
if challengeValues.Name != claims.Name || challengeValues.Handle != claims.Handle {
|
||||
return storeError(ctx, db, ch, false, NewError(ErrorRejectedIdentifierType, "OIDC claims don't match"))
|
||||
}
|
||||
if challengeValues.Name != claims.Name || challengeValues.Handle != claims.Handle {
|
||||
return storeError(ctx, db, ch, false, NewError(ErrorRejectedIdentifierType, "OIDC claims don't match"))
|
||||
}
|
||||
|
||||
// Update and store the challenge.
|
||||
|
Loading…
Reference in New Issue
Block a user