Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Authenticate ¶
type Authenticate struct {
// contains filtered or unexported fields
}
func New ¶
func New(opt ...Option) (*Authenticate, error)
func (*Authenticate) Generate ¶
func (a *Authenticate) Generate(opts ...TokenOption) (*Token, error)
func (*Authenticate) InspectWithJwk ¶
func (a *Authenticate) InspectWithJwk(signedToken []byte) (*User, error)
func (*Authenticate) Jwks ¶
func (a *Authenticate) Jwks() ([]byte, error)
type Option ¶
type Option func(*Options)
func WithRsaPrivateKey ¶
func WithRsaPrivateKey(key *rsa.PrivateKey) Option
func WithRsaPrivateKeyBytes ¶
func WithRsaPublic ¶
func WithRsaPublicKeyBytes ¶
type Options ¶
type Options struct { RsaPublicKeyBytes []byte // contains filtered or unexported fields }
Options .
type TokenOption ¶
type TokenOption func(options *TokenOptions)
func WithExpiration ¶
func WithExpiration(expiration time.Time) TokenOption
func WithIssuer ¶
func WithIssuer(issuer string) TokenOption
func WithMetadata ¶
func WithMetadata(metadata map[string]any) TokenOption
func WithSubject ¶
func WithSubject(sub string) TokenOption
type TokenOptions ¶
TokenOptions .
func NewGenerateTokenOptions ¶
func NewGenerateTokenOptions(opts ...TokenOption) TokenOptions
Click to show internal directories.
Click to hide internal directories.