Versions in this module Expand all Collapse all v0 v0.0.1 May 27, 2023 Changes in this version + type Authenticate struct + func New(opt ...Option) (*Authenticate, error) + func (a *Authenticate) Generate(opts ...TokenOption) (*Token, error) + func (a *Authenticate) Inspect(signedToken []byte) (*User, error) + func (a *Authenticate) InspectWithJwk(signedToken []byte) (*User, error) + func (a *Authenticate) Jwks() ([]byte, error) + type JwkType int + const JwkTypeJson + const JwkTypePem + type Option func(*Options) + func WithJwk(data []byte, jwkType JwkType) Option + func WithRsaPrivateKey(key *rsa.PrivateKey) Option + func WithRsaPrivateKeyBytes(privateKeyBytes []byte) Option + func WithRsaPublic(key *rsa.PublicKey) Option + func WithRsaPublicKeyBytes(publicKeyBytes []byte) Option + type Options struct + RsaPublicKeyBytes []byte + type Token struct + AccessToken string + Exp time.Time + Iat time.Time + Iss string + RefreshToken string + type TokenOption func(options *TokenOptions) + func WithExpiration(expiration time.Time) TokenOption + func WithIssuer(issuer string) TokenOption + func WithMetadata(metadata map[string]any) TokenOption + func WithSubject(sub string) TokenOption + type TokenOptions struct + Metadata map[string]any + func NewGenerateTokenOptions(opts ...TokenOption) TokenOptions + type User struct + ID string + Metadata map[string]interface{}