offline

package
v0.3.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 14, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func VerifyOffline

func VerifyOffline(off *Offline, r *http.Request) (jwt.Token, error)

func VerifyOfflineSlice

func VerifyOfflineSlice(offs []*Offline, r *http.Request) (jwt.Token, error)

Types

type InsufficientScopeError

type InsufficientScopeError struct {
	// contains filtered or unexported fields
}

func (*InsufficientScopeError) Error

func (e *InsufficientScopeError) Error() string

func (*InsufficientScopeError) Unwrap

func (e *InsufficientScopeError) Unwrap() error

type InvalidRequestError

type InvalidRequestError struct {
	// contains filtered or unexported fields
}

func ErrInvalidRequest

func ErrInvalidRequest(issuer string, msg string, err error) *InvalidRequestError

func (*InvalidRequestError) Error

func (e *InvalidRequestError) Error() string

func (*InvalidRequestError) Unwrap

func (e *InvalidRequestError) Unwrap() error

type InvalidTokenError

type InvalidTokenError struct {
	// contains filtered or unexported fields
}

func ErrInvalidToken

func ErrInvalidToken(issuer string, msg string, err error) *InvalidTokenError

func ErrMissingAuthentication

func ErrMissingAuthentication(err error) *InvalidTokenError

func (*InvalidTokenError) Error

func (e *InvalidTokenError) Error() string

func (*InvalidTokenError) Unwrap

func (e *InvalidTokenError) Unwrap() error

type Offline

type Offline struct {
	Issuer        string
	Audience      string
	KeyEndpoint   *url.URL
	KeySet        jwk.Set
	OutsideIssuer string
}

func New

func New(issuer string, audience string, refreshPeriod time.Duration) (*Offline, error)

Create a new offline struct by querying the well-known endpoint of the issuer

func (*Offline) SetOutsideIssuer

func (off *Offline) SetOutsideIssuer(issuer string)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL