Versions in this module Expand all Collapse all v0 v0.0.1 Jul 20, 2026 Changes in this version + const Version + var ErrExpiredToken = errors.New("github.com/qwerius/authgoblue: token has expired") + var ErrForbidden = errors.New("github.com/qwerius/authgoblue: forbidden") + var ErrInvalidClaims = errors.New("github.com/qwerius/authgoblue: invalid claims") + var ErrInvalidPassword = errors.New("github.com/qwerius/authgoblue: invalid password") + var ErrInvalidToken = errors.New("github.com/qwerius/authgoblue: invalid token") + var ErrIssuerRequired = errors.New("github.com/qwerius/authgoblue: issuer is required") + var ErrPasswordHash = errors.New("github.com/qwerius/authgoblue: failed to hash password") + var ErrSecretRequired = errors.New("github.com/qwerius/authgoblue: secret is required") + var ErrTokenTypeMismatch = errors.New("github.com/qwerius/authgoblue: invalid token type") + var ErrUnauthorized = errors.New("github.com/qwerius/authgoblue: unauthorized") + var ErrUserNotFound = errors.New("github.com/qwerius/authgoblue: user not found in context") + type AuthGoBlue struct + Context *ctx.Service + Hooks *hooks.Registry + Login *login.Service + Logout *logout.Service + LogoutHandler *logout.Handler + Middleware *middleware.Service + Password *password.Service + Permission *permission.Service + Providers *providers.Registry + Refresh *refresh.Service + Revoke *revoke.Service + RoleService *role.Service + Session *session.Service + Storage *storage.Registry + Token *token.Service + func New(config Config) *AuthGoBlue + func (a *AuthGoBlue) Config() Config + func (a *AuthGoBlue) Email(c fiber.Ctx) (string, error) + func (a *AuthGoBlue) HasPermission(c fiber.Ctx, permission string) (bool, error) + func (a *AuthGoBlue) Permissions(c fiber.Ctx) ([]string, error) + func (a *AuthGoBlue) Role(c fiber.Ctx) (string, error) + func (a *AuthGoBlue) SetupLogin(provider providers.Provider) + func (a *AuthGoBlue) SignIn(ctx context.Context, req login.Request) (*login.Result, error) + func (a *AuthGoBlue) UserID(c fiber.Ctx) (string, error) + func (a *AuthGoBlue) Username(c fiber.Ctx) (string, error) + type Config struct + AccessTokenTTL time.Duration + Cookie bool + CookieName string + Header string + Issuer string + MaxSessions int + Prefix string + RefreshTokenTTL time.Duration + RevokeStore revoke.Store + Secret string + SessionStore session.Store + func DefaultConfig() Config