Versions in this module Expand all Collapse all v4 v4.0.0 May 22, 2020 Changes in this version + var DefaultAuthorizeCodeTokenCfg = &Config + var DefaultClientTokenCfg = &Config + var DefaultCodeExp = time.Minute * 10 + var DefaultImplicitTokenCfg = &Config + var DefaultPasswordTokenCfg = &Config + var DefaultRefreshTokenCfg = &RefreshingConfig + func DefaultValidateURI(baseURI string, redirectURI string) error + type Config struct + AccessTokenExp time.Duration + IsGenerateRefresh bool + RefreshTokenExp time.Duration + type Manager struct + func NewDefaultManager() *Manager + func NewManager() *Manager + func (m *Manager) GenerateAccessToken(ctx context.Context, gt oauth2.GrantType, tgr *oauth2.TokenGenerateRequest) (oauth2.TokenInfo, error) + func (m *Manager) GenerateAuthToken(ctx context.Context, rt oauth2.ResponseType, tgr *oauth2.TokenGenerateRequest) (oauth2.TokenInfo, error) + func (m *Manager) GetClient(ctx context.Context, clientID string) (cli oauth2.ClientInfo, err error) + func (m *Manager) LoadAccessToken(ctx context.Context, access string) (oauth2.TokenInfo, error) + func (m *Manager) LoadRefreshToken(ctx context.Context, refresh string) (oauth2.TokenInfo, error) + func (m *Manager) MapAccessGenerate(gen oauth2.AccessGenerate) + func (m *Manager) MapAuthorizeGenerate(gen oauth2.AuthorizeGenerate) + func (m *Manager) MapClientStorage(stor oauth2.ClientStore) + func (m *Manager) MapTokenStorage(stor oauth2.TokenStore) + func (m *Manager) MustClientStorage(stor oauth2.ClientStore, err error) + func (m *Manager) MustTokenStorage(stor oauth2.TokenStore, err error) + func (m *Manager) RefreshAccessToken(ctx context.Context, tgr *oauth2.TokenGenerateRequest) (oauth2.TokenInfo, error) + func (m *Manager) RemoveAccessToken(ctx context.Context, access string) error + func (m *Manager) RemoveRefreshToken(ctx context.Context, refresh string) error + func (m *Manager) SetAuthorizeCodeExp(exp time.Duration) + func (m *Manager) SetAuthorizeCodeTokenCfg(cfg *Config) + func (m *Manager) SetClientTokenCfg(cfg *Config) + func (m *Manager) SetImplicitTokenCfg(cfg *Config) + func (m *Manager) SetPasswordTokenCfg(cfg *Config) + func (m *Manager) SetRefreshTokenCfg(cfg *RefreshingConfig) + func (m *Manager) SetValidateURIHandler(handler ValidateURIHandler) + type RefreshingConfig struct + AccessTokenExp time.Duration + IsGenerateRefresh bool + IsRemoveAccess bool + IsRemoveRefreshing bool + IsResetRefreshTime bool + RefreshTokenExp time.Duration + type ValidateURIHandler func(baseURI, redirectURI string) error Other modules containing this package gopkg.in/oauth2.v2 gopkg.in/oauth2.v3