Documentation
¶
Index ¶
- Constants
- func AuthenticationFunc1(c context.Context, input *openapi3filter.AuthenticationInput) error
- func GenerateAccessToken(secretKey []byte, userID uint, expiresIn time.Duration) (string, error)
- func GenerateRefreshToken(secretKey []byte, userID uint, expiry time.Time) (string, error)
- func GenerateTokens(secretKey []byte, userID uint, expiresIn time.Duration) (string, string, time.Time, error)
- func HashPassword(password string) (string, error)
- func ValidatePassword(hash, password string) bool
Constants ¶
View Source
const ( AuthorizationHeader = "Authorization" BearerPrefix = "Bearer " )
Variables ¶
This section is empty.
Functions ¶
func AuthenticationFunc1 ¶
func AuthenticationFunc1(c context.Context, input *openapi3filter.AuthenticationInput) error
func GenerateAccessToken ¶
func GenerateRefreshToken ¶
func GenerateTokens ¶
func HashPassword ¶
HashPassword securely hashes a password using bcrypt.
func ValidatePassword ¶
ValidatePassword compares a hashed password with a provided password.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.