mirror of
https://github.com/nais/wonderwall.git
synced 2026-05-11 10:56:53 +00:00
wip: sid claim only required if frontchannel_logout_session_supported && frontchannel_logout_supported.
This commit is contained in:
@@ -88,7 +88,10 @@ func (h *Handler) validateIDToken(idToken *openid.IDToken, loginCookie *openid.L
|
||||
jwt.WithClaimValue("nonce", loginCookie.Nonce),
|
||||
jwt.WithIssuer(h.Provider.GetOpenIDConfiguration().Issuer),
|
||||
jwt.WithAcceptableSkew(5 * time.Second),
|
||||
jwt.WithRequiredClaim("sid"),
|
||||
}
|
||||
|
||||
if h.sidClaimRequired() {
|
||||
validateOpts = append(validateOpts, jwt.WithRequiredClaim("sid"))
|
||||
}
|
||||
|
||||
if len(h.Provider.GetClientConfiguration().GetACRValues()) > 0 {
|
||||
@@ -107,3 +110,8 @@ func (h *Handler) validateIDToken(idToken *openid.IDToken, loginCookie *openid.L
|
||||
|
||||
return externalSessionID, nil
|
||||
}
|
||||
|
||||
func (h *Handler) sidClaimRequired() bool {
|
||||
config := h.Provider.GetOpenIDConfiguration()
|
||||
return config.FrontchannelLogoutSupported && config.FrontchannelLogoutSessionSupported
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user