local

package
v0.0.2 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 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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