Enhance cursor rules and add user management functionality
- Updated cursor rules to emphasize the importance of dependency injection and logging practices. - Introduced a new user management domain, including entities, services, handlers, and validation. - Implemented user authentication features such as login, registration, and role-based access control. - Added Redis integration for token management and caching. - Enhanced API documentation with Swagger for user-related endpoints. - Updated configuration to support new JWT settings and Redis connection parameters.
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
package authorization
|
||||
|
||||
import "errors"
|
||||
|
||||
// Authorization errors
|
||||
var (
|
||||
ErrEmptyAccessTokenSecret = errors.New("access token secret cannot be empty")
|
||||
ErrEmptyRefreshTokenSecret = errors.New("refresh token secret cannot be empty")
|
||||
ErrInvalidAccessTokenExpiry = errors.New("access token expiry must be greater than 0")
|
||||
ErrInvalidRefreshTokenExpiry = errors.New("refresh token expiry must be greater than 0")
|
||||
ErrAccessTokenExpiryTooLong = errors.New("access token expiry cannot be longer than refresh token expiry")
|
||||
ErrEmptyIssuer = errors.New("JWT issuer cannot be empty")
|
||||
ErrEmptyAudience = errors.New("JWT audience cannot be empty")
|
||||
ErrInvalidToken = errors.New("invalid token")
|
||||
ErrTokenExpired = errors.New("token has expired")
|
||||
ErrTokenBlacklisted = errors.New("token is blacklisted")
|
||||
ErrInvalidTokenType = errors.New("invalid token type")
|
||||
ErrInvalidSigningMethod = errors.New("invalid signing method")
|
||||
ErrInvalidClaims = errors.New("invalid token claims")
|
||||
ErrTokenValidationFailed = errors.New("token validation failed")
|
||||
ErrInsufficientPermissions = errors.New("insufficient permissions")
|
||||
ErrCompanyAccessDenied = errors.New("access denied to this company")
|
||||
)
|
||||
Reference in New Issue
Block a user