Versions in this module Expand all Collapse all v0 v0.8.3 May 8, 2023 Changes in this version + func NewManager(cfg *configs.Auth, clientStore oauth2.ClientStore, ...) *manage.Manager + func NewServer(logger *slog.Logger, manager oauth2.Manager) *server.Server + type AccessGenerate struct + func NewAccessGenerate(tokenManager jwt.Manager) *AccessGenerate + func (g *AccessGenerate) Token(ctx context.Context, data *oauth2.GenerateBasic, isGenRefresh bool) (string, string, error) + type ClientStore struct + func NewClientStore(clientManager manager.Client) *ClientStore + func (s *ClientStore) Create(ctx context.Context, info oauth2.ClientInfo) error + func (s *ClientStore) GetByID(ctx context.Context, id string) (oauth2.ClientInfo, error) + type TokenStore struct + func NewTokenStore(cfg *configs.Auth, db *gorm.DB) *TokenStore + func (s *TokenStore) Close() + func (s *TokenStore) Create(ctx context.Context, info oauth2.TokenInfo) error + func (s *TokenStore) GetByAccess(ctx context.Context, access string) (oauth2.TokenInfo, error) + func (s *TokenStore) GetByCode(ctx context.Context, code string) (oauth2.TokenInfo, error) + func (s *TokenStore) GetByRefresh(ctx context.Context, refresh string) (oauth2.TokenInfo, error) + func (s *TokenStore) RemoveByAccess(ctx context.Context, access string) error + func (s *TokenStore) RemoveByCode(ctx context.Context, code string) error + func (s *TokenStore) RemoveByRefresh(ctx context.Context, refresh string) error + func (s *TokenStore) SetStdout(stdout io.Writer) *TokenStore