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 ¶ added in v1.2.0
ComparePasswords func for a comparing password.
func ConnectionURLBuilder ¶ added in v1.2.0
ConnectionURLBuilder func for building URL connection.
func GeneratePassword ¶ added in v1.2.0
GeneratePassword func for a making hash & salt with user password.
func GetCredentialsByRole ¶ added in v1.2.0
GetCredentialsByRole func for getting credentials from a role name.
func NewValidator ¶ added in v1.2.0
func NewValidator() *validator.Validate
NewValidator func for create a new validator for model fields.
func NormalizePassword ¶ added in v1.2.0
NormalizePassword func for a returning the users input as a byte slice.
func ParseRefreshToken ¶ added in v1.2.0
ParseRefreshToken func for parse second argument from refresh token.
func StartServer ¶ added in v1.2.0
func StartServer(a *fiber.App)
StartServer func for starting a simple server.
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 ¶ added in v1.2.0
VerifyRole func for verifying a given role.
Types ¶
type TokenMetadata ¶ added in v1.2.0
TokenMetadata struct to describe metadata in JWT.
func ExtractTokenMetadata ¶ added in v1.2.0
func ExtractTokenMetadata(c *fiber.Ctx) (*TokenMetadata, error)
ExtractTokenMetadata func to extract metadata from JWT.