Documentation ¶
Index ¶
- func ComparePasswords(hashedPwd, inputPwd string) bool
- func ConnectionURLBuilder(n string) (string, error)
- func GeneratePassword(p string) string
- func GetCredentialsByRole(role string) ([]string, error)
- func NewValidator() *validator.Validate
- func NormalizePassword(p string) []byte
- func ParseRefreshToken(refreshToken string) (int64, error)
- func StartServer(a *fiber.App)
- func StartServerWithGracefulShutdown(a *fiber.App)
- func ValidatorErrors(err error) map[string]string
- func VerifyRole(role string) (string, error)
- type TokenMetadata
- type Tokens
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComparePasswords ¶
ComparePasswords func for a comparing password.
func ConnectionURLBuilder ¶
ConnectionURLBuilder func for building URL connection.
func GeneratePassword ¶
GeneratePassword func for a making hash & salt with user password.
func GetCredentialsByRole ¶
GetCredentialsByRole func for getting credentials from a role name.
func NewValidator ¶
func NewValidator() *validator.Validate
NewValidator func for create a new validator for model fields.
func NormalizePassword ¶
NormalizePassword func for a returning the users input as a byte slice.
func ParseRefreshToken ¶
ParseRefreshToken func for parse second argument from refresh token.
func StartServerWithGracefulShutdown ¶
func StartServerWithGracefulShutdown(a *fiber.App)
StartServerWithGracefulShutdown function for starting server with a graceful shutdown.
func ValidatorErrors ¶
ValidatorErrors func for show validation errors for each invalid fields.
func VerifyRole ¶
VerifyRole func for verifying a given role.
Types ¶
type TokenMetadata ¶
TokenMetadata struct to describe metadata in JWT.
func ExtractTokenMetadata ¶
func ExtractTokenMetadata(c *fiber.Ctx) (*TokenMetadata, error)
ExtractTokenMetadata func to extract metadata from JWT.