Skip to content

Commit

Permalink
add secret from token independent of http.Request
Browse files Browse the repository at this point in the history
  • Loading branch information
dhontecillas committed May 5, 2024
1 parent 4329232 commit faa2081
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions jwk_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,11 @@ func (j *JWKClient) GetSecret(r *http.Request) (interface{}, error) {
if err != nil {
return nil, err
}
return j.SecretFromToken(token)
}

// SecretFromToken implements the GetSecret method of the SecretProvider interface.
func (j *JWKClient) SecretFromToken(token *jwt.JSONWebToken) (interface{}, error) {
if len(token.Headers) < 1 {
return nil, auth0.ErrNoJWTHeaders
}
Expand Down

0 comments on commit faa2081

Please sign in to comment.