Merge pull request #1143 from wkalt/fix-verifier-creation-typo

Correct "Verifier" method name in using-dex doc
This commit is contained in:
Eric Chiang 2017-12-05 17:47:11 -05:00 committed by GitHub
commit 5172a46171
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -75,7 +75,7 @@ oauth2Config := oauth2.Config{
} }
// Create an ID token parser. // Create an ID token parser.
idTokenVerifier := provider.NewVerifier(&oidc.Config{ClientID: "example-app"}) idTokenVerifier := provider.Verifier(&oidc.Config{ClientID: "example-app"})
``` ```
The HTTP server should then redirect unauthenticated users to dex to initialize the OAuth2 flow. The HTTP server should then redirect unauthenticated users to dex to initialize the OAuth2 flow.
@ -149,7 +149,7 @@ if err != nil {
// handle error // handle error
} }
// Create an ID token parser, but only trust ID tokens issued to "example-app" // Create an ID token parser, but only trust ID tokens issued to "example-app"
idTokenVerifier := provider.NewVerifier(&oidc.Config{ClientID: "example-app"}) idTokenVerifier := provider.Verifier(&oidc.Config{ClientID: "example-app"})
``` ```
The verifier can then be used to pull user info out of tokens: The verifier can then be used to pull user info out of tokens: