diff options
| author | mo khan <mo@mokhan.ca> | 2025-04-23 11:03:47 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2025-04-23 11:03:47 -0600 |
| commit | d9a87d00a5e8200b01018203ff6f9afbc5662329 (patch) | |
| tree | cdb4bd4a8222a4ea4fb2da7f5ab6a80fa794b03b /pkg | |
| parent | 41be7375c59d840810d00129171dec034a6177d2 (diff) | |
docs: add an example ID Token
Diffstat (limited to 'pkg')
| -rw-r--r-- | pkg/oidc/id_token.go | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/pkg/oidc/id_token.go b/pkg/oidc/id_token.go index e708eb3..962f372 100644 --- a/pkg/oidc/id_token.go +++ b/pkg/oidc/id_token.go @@ -2,6 +2,54 @@ package oidc import "github.com/coreos/go-oidc/v3/oidc" +/* +Example ID Token from GitLab OIDC Provider: + +```json + + { + "iss": "http://gdk.test:3000", + "sub": "1", + "aud": "e31e1da0b8f6b6e35ca70c790b13c0406e44aca6b2bf67f55de7355a979a224f", + "exp": 1745427493, + "iat": 1745427373, + "auth_time": 1745418001, + "sub_legacy": "2474cf0b2211688a57297ace0e260a15944754d16b1bd42c9d6779c900367807", + "name": "Administrator", + "nickname": "root", + "preferred_username": "root", + "email": "admin@example.com", + "email_verified": true, + "profile": "http://gdk.test:3000/root", + "picture": "https://www.gravatar.com/avatar/258d8dc916db8cea2cafb6c3cd0cb0246efe061421dbd83ec3a350428cabda4f?s=80&d=identicon", + "groups_direct": [ + "gitlab-org", + "toolbox", + "mass_insert_group__0_100", + "custom-roles-root-group/aa", + "custom-roles-root-group/aa/aaa", + "gnuwget", + "Commit451", + "jashkenas", + "flightjs", + "twitter", + "gitlab-examples", + "gitlab-examples/security", + "412708", + "gitlab-examples/demo-group", + "custom-roles-root-group", + "434044-group-1", + "434044-group-2", + "gitlab-org1", + "gitlab-org/secure", + "gitlab-org/secure/managers", + "gitlab-org/security-products", + "gitlab-org/security-products/analyzers" + ] + } + +``` +*/ type IDToken = oidc.IDToken type RawToken string |
