Documentation
¶
Index ¶
- Constants
- func GetMedatata(server string) (map[string]any, error)
- func GetOriginalURL(ctx context.Context) *url.URL
- 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 RewriteSetOriginalURL(r *httputil.ProxyRequest)
- func TokenContext(parent context.Context, token jwt.Token, rawToken string) context.Context
- func WithOriginalURL(ctx context.Context, url *url.URL) 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.
func RewriteSetOriginalURL ¶ added in v0.3.0
func RewriteSetOriginalURL(r *httputil.ProxyRequest)
func TokenContext ¶
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.