feat: pkce
This commit is contained in:
parent
c1f4d01965
commit
be6737328c
6 changed files with 100 additions and 15 deletions
|
@ -18,6 +18,10 @@ type CodeChallenge struct {
|
|||
Method CodeChallengeMethod
|
||||
}
|
||||
|
||||
func NewSHACodeChallenge(code string) string {
|
||||
return utils.HashString(sha256.New(), code)
|
||||
}
|
||||
|
||||
func VerifyCodeChallenge(c *CodeChallenge, codeVerifier string) bool {
|
||||
if c == nil {
|
||||
return false //TODO: ?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue