Skip to content

Commit

Permalink
Add scope values predefined in the specification coreos#385
Browse files Browse the repository at this point in the history
Signed-off-by: junya koyama <arukiidou@yahoo.co.jp>
  • Loading branch information
arukiidou committed Aug 15, 2023
1 parent f0117a5 commit b310b5a
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions oidc/oidc.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,33 @@ const (
// ScopeOpenID is the mandatory scope for all OpenID Connect OAuth2 requests.
ScopeOpenID = "openid"

// ScopeProfile is an optional [scope value] defined by OpenID Connect for requesting
// access to the End-User's default profile Claims, which are:
// name, family_name, given_name, middle_name, nickname, preferred_username,
// profile, picture, website, gender, birthdate, zoneinfo, locale, and updated_at.
//
// [scope value]: https://openid.net/specs/openid-connect-core-1_0.html#ScopeClaims
ScopeProfile = "profile"

// ScopeProfile is an optional [scope value] defined by OpenID Connect for requesting
// access to the email and email_verified Claims.
//
// [scope value]: https://openid.net/specs/openid-connect-core-1_0.html#ScopeClaims
ScopeEmail = "email"

// ScopeProfile is an optional [scope value] defined by OpenID Connect for requesting
// access to the [address Claim].
//
// [scope value]: https://openid.net/specs/openid-connect-core-1_0.html#ScopeClaims
// [address Claim]: https://openid.net/specs/openid-connect-core-1_0.html#AddressClaim
ScopeAddress = "address"

// ScopeProfile is an optional [scope value] defined by OpenID Connect for requesting
// access to the phone_number and phone_number_verified Claims.
//
// [scope value]: https://openid.net/specs/openid-connect-core-1_0.html#ScopeClaims
ScopePhone = "phone"

// ScopeOfflineAccess is an optional scope defined by OpenID Connect for requesting
// OAuth2 refresh tokens.
//
Expand Down

0 comments on commit b310b5a

Please sign in to comment.