chore(op): add test for PKCE verification
This commit is contained in:
parent
f8c3a2c6aa
commit
6e7d3a2d81
2 changed files with 77 additions and 2 deletions
|
@ -141,10 +141,10 @@ func AuthorizeCodeChallenge(codeVerifier string, challenge *oidc.CodeChallenge)
|
|||
}
|
||||
|
||||
if codeVerifier == "" {
|
||||
return oidc.ErrInvalidRequest().WithDescription("code_challenge required")
|
||||
return oidc.ErrInvalidRequest().WithDescription("code_verifier required")
|
||||
}
|
||||
if !oidc.VerifyCodeChallenge(challenge, codeVerifier) {
|
||||
return oidc.ErrInvalidGrant().WithDescription("invalid code challenge")
|
||||
return oidc.ErrInvalidGrant().WithDescription("invalid code_verifier")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue