1
0
Fork 0
mirror of https://github.com/Luzifer/nginx-sso.git synced 2024-12-20 21:01:17 +00:00
nginx-sso/vendor/github.com/coreos/go-oidc/example
Knut Ahlers b8c89a5e0f
Vendor new dependencies for OIDC
Signed-off-by: Knut Ahlers <knut@ahlers.me>
2019-04-23 00:50:32 +02:00
..
idtoken Vendor new dependencies for OIDC 2019-04-23 00:50:32 +02:00
nonce Vendor new dependencies for OIDC 2019-04-23 00:50:32 +02:00
userinfo Vendor new dependencies for OIDC 2019-04-23 00:50:32 +02:00
README.md Vendor new dependencies for OIDC 2019-04-23 00:50:32 +02:00

Examples

These are example uses of the oidc package. Each requires a Google account and the client ID and secret of a registered OAuth2 application. To create one:

  1. Visit your Google Developer Console.
  2. Click "Credentials" on the left column.
  3. Click the "Create credentials" button followed by "OAuth client ID".
  4. Select "Web application" and add "http://127.0.0.1:5556/auth/google/callback" as an authorized redirect URI.
  5. Click create and add the printed client ID and secret to your environment using the following variables:
GOOGLE_OAUTH2_CLIENT_ID
GOOGLE_OAUTH2_CLIENT_SECRET

Finally run the examples using the Go tool and navigate to http://127.0.0.1:5556.

go run ./example/idtoken/app.go