Documentation
¶
Index ¶
- func Contains(a string, values []string) bool
- func DecodeJWTPart(part string) ([]byte, error)
- func EpochToHumanDate(epochTime int) string
- func GenerateLegacyToken(res *http.Response, username, password string) string
- func GenerateOTP(secret string) string
- func OTPPending(claims map[string]interface{}) bool
- func ParseUserJWT(tokenString, secret string) (jwtv5.MapClaims, error)
- func PerformLogin(testServerURL string) string
- func Remove(a string, values []string) []string
- func Setup2FA(testServerURL string, token string, t *testing.T) string
- func Verify2FA(testServerURL string, otp string, token string, t *testing.T) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeJWTPart ¶ added in v0.0.3
decodeJWTPart decodes a JWT base64url part
func EpochToHumanDate ¶ added in v0.0.3
func GenerateLegacyToken ¶
func GenerateOTP ¶ added in v0.0.3
GenerateOTP generates a TOTP code for the given secret.
func OTPPending ¶ added in v0.8.0
OTPPending reports whether the claims belong to a token of a user with 2FA enabled whose OTP has not been verified yet.
func ParseUserJWT ¶ added in v0.8.0
ParseUserJWT validates a user JWT (HS256 signature with secret and expiration) and returns its claims.
func PerformLogin ¶ added in v0.0.3
Types ¶
This section is empty.