feat: pkce

This commit is contained in:
Livio Amstutz 2020-01-28 08:51:34 +01:00
parent c1f4d01965
commit be6737328c
6 changed files with 100 additions and 15 deletions

View file

@ -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: ?