Documentation
¶
Overview ¶
Package auth validates JWT bearer tokens and stores the caller in the request context.
Index ¶
- func NewJWTMiddleware(opts JWTOptions) (func(http.Handler) http.Handler, error)
- func ParseRSAPrivateKey(pemBytes []byte) (*rsa.PrivateKey, error)
- func ParseRSAPublicKey(pemBytes []byte) (*rsa.PublicKey, error)
- func WithPrincipal(ctx context.Context, p *Principal) context.Context
- type JWTOptions
- type Principal
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewJWTMiddleware ¶
func ParseRSAPrivateKey ¶
func ParseRSAPrivateKey(pemBytes []byte) (*rsa.PrivateKey, error)
Types ¶
type JWTOptions ¶
type Principal ¶
func FromContext ¶
func (*Principal) ClaimString ¶
func (*Principal) IsAuthenticated ¶
Click to show internal directories.
Click to hide internal directories.