Versions in this module Expand all Collapse all v1 v1.0.1 May 10, 2021 v1.0.0 May 9, 2021 Changes in this version + const CookieName + const MetadataKey + var DefaultAuth = NewAuth() + func ContextWithAccount(ctx context.Context, account *Account) (context.Context, error) + func Expiry(ex time.Time) func(o *GenerateOptions) + func Metadata(md map[string]string) func(o *GenerateOptions) + func Roles(rs []*Role) func(o *GenerateOptions) + type Account struct + Created time.Time + Expiry time.Time + Id string + Metadata map[string]string + Roles []*Role + Token string + func AccountFromContext(ctx context.Context) (*Account, error) + type Auth interface + Generate func(id string, opts ...GenerateOption) (*Account, error) + Init func(opts ...Option) error + Options func() Options + Revoke func(token string) error + String func() string + Verify func(token string) (*Account, error) + func NewAuth(opts ...Option) Auth + type GenerateOption func(o *GenerateOptions) + type GenerateOptions struct + Expiry time.Time + Metadata map[string]string + Roles []*Role + func NewGenerateOptions(opts ...GenerateOption) GenerateOptions + type Option func(o *Options) + func Exclude(e ...string) Option + func LoginURL(url string) Option + func PrivateKey(key string) Option + func Provider(p provider.Provider) Option + func PublicKey(key string) Option + func Token(t string) Option + type Options struct + Exclude []string + LoginURL string + PrivateKey string + Provider provider.Provider + PublicKey string + Token string + type Resource struct + Name string + Type string + type Role struct + Name string + Resource *Resource Incompatible versions in this module v2.3.0+incompatible May 9, 2021