local

package
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 20, 2026 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

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.

func NewCodec

func NewCodec(issuer string, privateKey *rsa.PrivateKey) (Codec, error)

NewCodec creates an RSA-backed codec for a fixed issuer.

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) ExchangeAuthorizationCode

func (p *Provider) ExchangeAuthorizationCode(_ context.Context, req provider.ExchangeRequest) (*schema.IdentityInsert, error)

func (*Provider) HTTPHandler

func (p *Provider) HTTPHandler() httprequest.PathItem

func (*Provider) Key

func (p *Provider) Key() string

func (*Provider) PublicConfig

func (p *Provider) PublicConfig() schema.PublicClientConfiguration

func (*Provider) ServeHTTP

func (p *Provider) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL