Documentation ¶
Index ¶
- Constants
- func AuthMiddleware(next http.Handler) http.Handler
- func CreateRefreshToken() string
- func CreateToken(account *authEntities.Account, permissions []string) (string, time.Time, error)
- func DecodeToken(tokenString string) (*dto.ClaimsJWT, error)
- func GetAccountIDByJWTToken(token string) (uuid.UUID, error)
Constants ¶
View Source
const ( DefaultSecretJWT = "horusec-secret" WarningDefaultJWTSecretKey = "{JWT-INSECURE} horusec JWT secret key is the default one, for security " + "reasons please replace it for a secure value, secret key environment variable name --> {HORUSEC_JWT_SECRET_KEY}" )
Variables ¶
This section is empty.
Functions ¶
func CreateRefreshToken ¶
func CreateRefreshToken() string
func CreateToken ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.