fix: code challenge
This commit is contained in:
parent
5d91ebfd62
commit
c065f66d08
2 changed files with 8 additions and 5 deletions
|
@ -18,7 +18,10 @@ type CodeChallenge struct {
|
|||
Method CodeChallengeMethod
|
||||
}
|
||||
|
||||
func (c *CodeChallenge) Verify(codeVerifier string) bool {
|
||||
func VerifyCodeChallenge(c *CodeChallenge, codeVerifier string) bool {
|
||||
if c == nil {
|
||||
return false //TODO: ?
|
||||
}
|
||||
if c.Method == CodeChallengeMethodS256 {
|
||||
codeVerifier = utils.HashString(sha256.New(), codeVerifier)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue