Skip to content

Commit

Permalink
Remove obsolete method #247
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcel Ludwig authored and Johannes Koch committed Aug 19, 2021
1 parent 8207791 commit cfb1d11
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions eval/lib/oauth2.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,21 +140,6 @@ func NewOAuthCodeChallengeFunction(verifier func() (*pkce.CodeVerifier, error))
})
}

func NewOAuthHashedCsrfTokenFunction(verifier func() (*pkce.CodeVerifier, error)) function.Function {
return function.New(&function.Spec{
Params: []function.Parameter{},
Type: function.StaticReturnType(cty.String),
Impl: func(args []cty.Value, _ cty.Type) (ret cty.Value, err error) {
hashedVerifier, err := createCodeChallenge(verifier)
if err != nil {
return cty.StringVal(""), err
}

return cty.StringVal(hashedVerifier), nil
},
})
}

func createCodeChallenge(verifier func() (*pkce.CodeVerifier, error)) (string, error) {
codeVerifier, err := verifier()
if err != nil {
Expand Down

0 comments on commit cfb1d11

Please sign in to comment.