authelia/internal/oidc/const.go
James Elliott c9d86a9240
feat(oidc): oauth2 discovery support (#2925)
* feat(oidc): oauth2 discovery and endpoint rename

This implements the oauth2 authorization server discovery document, adds tests to the discovery documents, implements an efficiency upgrade to these docs, and renames some endpoints to be uniform.
2022-03-04 14:09:27 +11:00

34 lines
972 B
Go

package oidc
// Scope strings.
const (
ScopeOfflineAccess = "offline_access"
ScopeOpenID = "openid"
ScopeProfile = "profile"
ScopeEmail = "email"
ScopeGroups = "groups"
)
// Claim strings.
const (
ClaimGroups = "groups"
ClaimDisplayName = "name"
ClaimPreferredUsername = "preferred_username"
ClaimEmail = "email"
ClaimEmailVerified = "email_verified"
ClaimEmailAlts = "alt_emails"
)
// Paths.
const (
WellKnownOpenIDConfigurationPath = "/.well-known/openid-configuration"
WellKnownOAuthAuthorizationServerPath = "/.well-known/oauth-authorization-server"
JWKsPath = "/api/oidc/jwks"
AuthorizationPath = "/api/oidc/authorization"
TokenPath = "/api/oidc/token" //nolint:gosec // This is not a hard coded credential, it's a path.
IntrospectionPath = "/api/oidc/introspection"
RevocationPath = "/api/oidc/revocation"
UserinfoPath = "/api/oidc/userinfo"
)