Documentation
¶
Index ¶
- Constants
- func GetMedatata(server string) (map[string]any, error)
- func GetRawToken(ctx context.Context) string
- func GetToken(ctx context.Context) jwt.Token
- func NewAuthorizationHandler(config *config.Config, meta map[string]any) (http.Handler, error)
- func NewAuthorizationServerMetadataHandler(config *config.Config) http.Handler
- func NewDynamicClientRegistrationHandler(config *config.Config, meta map[string]any) (http.Handler, error)
- func NewProtectedResourceHandler(config *config.Config) http.Handler
- func TokenContext(parent context.Context, token jwt.Token, rawToken string) context.Context
- type ClientInformation
- type Manager
- type ProtectedResourceMetadata
Constants ¶
View Source
const AuthorizationPath = "/oauth/authorize"
View Source
const AuthorizationServerMetadataPath = "/.well-known/oauth-authorization-server"
View Source
const DynamicClientRegistrationPath = "/oauth/register"
View Source
const OIDCMetadataPath = "/.well-known/openid-configuration"
View Source
const ProtectedResourcePath = "/.well-known/oauth-protected-resource/"
Variables ¶
This section is empty.
Functions ¶
func GetRawToken ¶
func NewAuthorizationHandler ¶
func NewProtectedResourceHandler ¶
NewWellKnownHandler implement the OAuth 2.0 Protected Resource Metadata (RFC9728) specification to indicate the locations of authorization servers.
Should be used to create a handler for the /.well-known/oauth-protected-resource endpoint.
Types ¶
type ClientInformation ¶
type ClientInformation struct {
ClientID string `json:"client_id"`
ClientSecret string `json:"client_secret,omitempty"`
ClientSecretExpiresAt int64 `json:"client_secret_expires_at,omitempty"`
ClientName string `json:"client_name,omitempty"`
RedirectURIs []string `json:"redirect_uris"`
LogoURI string `json:"logo_uri,omitempty"`
Scope string `json:"scope,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.