Validate OIDC Session State
This commit is contained in:
parent
a628b852eb
commit
5ab17d9a40
@ -123,3 +123,13 @@ func (p *OIDCProvider) createSessionState(token *oauth2.Token, ctx context.Conte
|
|||||||
Email: claims.Email,
|
Email: claims.Email,
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (p *OIDCProvider) ValidateSessionState(s *SessionState) bool {
|
||||||
|
ctx := context.Background()
|
||||||
|
_, err := p.Verifier.Verify(ctx, s.IdToken)
|
||||||
|
if err != nil {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user