-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
auth0.NewValidator not enough args #11
Comments
Passing
|
auth0 provides some helpers for it
|
Getting the same 'Token is not valid: ' even with the suggested jwtHeaderExtractor. New to auth0 and unfamiliar with the NewJWKClient call as opposed to validator.ValidateRequest. If there's a straightforward fix for this can someone post a pull request? |
Using the JWKClient should fix the problem: auth0Domain := your_auth0_domain
jwkClient := auth0.NewJWKClient(auth0.JWKClientOptions{URI: fmt.Sprintf("%s.well-known/jwks.json", auth0Domain)}, nil)
validator := auth0.NewValidator(auth0.NewConfiguration(jwkClient, []string{}, auth0Domain, jose.RS256), nil)
jwt, err := validator.ValidateRequest(yourRequest) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Following the instructions in the README, I get
$ go run main.go
command-line-arguments
./main.go:50:34: not enough arguments in call to auth0.NewValidator
have (auth0.Configuration)
want (auth0.Configuration, auth0.RequestTokenExtractor)
Passing nil for the missing parameter seems to work.
The text was updated successfully, but these errors were encountered: