Documentation
¶
Index ¶
- type Codec
- type Provider
- func (p *Provider) BeginAuthorization(_ context.Context, req provider.AuthorizationRequest) (*provider.AuthorizationResponse, error)
- func (p *Provider) ExchangeAuthorizationCode(_ context.Context, req provider.ExchangeRequest) (*schema.IdentityInsert, error)
- func (p *Provider) HTTPHandler() httprequest.PathItem
- func (p *Provider) Key() string
- func (p *Provider) PublicConfig() schema.PublicClientConfiguration
- func (p *Provider) ServeHTTP(w http.ResponseWriter, r *http.Request)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Codec ¶
type Codec interface {
Issuer() (string, error)
Sign(jwt.Claims) (string, error)
Verify(token, issuer string) (map[string]any, error)
}
Codec signs and verifies provider-owned tokens for authorization flows.
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
func New ¶
func New(issuer string, privateKey *rsa.PrivateKey) (*Provider, error)
New creates the built-in local provider for a fixed issuer and signing key.
func (*Provider) BeginAuthorization ¶
func (p *Provider) BeginAuthorization(_ context.Context, req provider.AuthorizationRequest) (*provider.AuthorizationResponse, error)
func (*Provider) ExchangeAuthorizationCode ¶
func (p *Provider) ExchangeAuthorizationCode(_ context.Context, req provider.ExchangeRequest) (*schema.IdentityInsert, error)
func (*Provider) HTTPHandler ¶
func (p *Provider) HTTPHandler() httprequest.PathItem
func (*Provider) PublicConfig ¶
func (p *Provider) PublicConfig() schema.PublicClientConfiguration
Click to show internal directories.
Click to hide internal directories.