Versions in this module Expand all Collapse all v1 v1.1.0 May 5, 2026 v1.0.0 May 3, 2026 Changes in this version + const RoleModerator + const RolePublisher + const RoleRegisteredUser + const SigningAlgorithm + var ErrVerifyAPIUnavailable = fmt.Errorf("auth API is unavailable") + func ExtractToken(authHeader string) string + type APIClient interface + VerifyToken func(ctx context.Context, token string) (bool, error) + type Claims struct + Name string + UserRole string + Username string + VerificationRequired bool + func (c *Claims) UserID() string + type Client struct + func New(log *zap.Logger, authAPIClient APIClient) (*Client, error) + func (c *Client) ParseToken(tokenStr string) (*Claims, error) + func (c *Client) Verify(ctx context.Context, tokenStr string) error