Documentation
¶
Index ¶
- type Authenticate
- func (a *Authenticate) Generate(opts ...TokenOption) (*Token, error)
- func (a *Authenticate) Inspect(signedToken []byte) (*Token, error)
- func (a *Authenticate) InspectWithJwk(signedToken []byte) (*Token, error)
- func (a *Authenticate) Jwks() ([]byte, error)
- func (a *Authenticate) Parse(signedToken []byte) (*Token, error)
- func (a *Authenticate) PrivateKeyBytes() []byte
- func (a *Authenticate) PublicKeyBytes() []byte
- type JwkType
- type Option
- func WithDefaultRsaKeyPair(b bool) Option
- 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
- type Token
- type TokenOption
- type TokenOptions
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) (*Token, error)
func (*Authenticate) Jwks ¶
func (a *Authenticate) Jwks() ([]byte, error)
func (*Authenticate) PrivateKeyBytes ¶
func (a *Authenticate) PrivateKeyBytes() []byte
func (*Authenticate) PublicKeyBytes ¶
func (a *Authenticate) PublicKeyBytes() []byte
type Option ¶
type Option func(*Options)
func WithDefaultRsaKeyPair ¶
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 WithClaims ¶
func WithClaims(claims map[string]any) TokenOption
func WithExpiration ¶
func WithExpiration(expiration time.Duration) TokenOption
func WithIssuer ¶
func WithIssuer(issuer string) 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.