utils

package
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 25, 2025 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains added in v0.0.3

func Contains(a string, values []string) bool

func DecodeJWTPart added in v0.0.3

func DecodeJWTPart(part string) ([]byte, error)

decodeJWTPart decodes a JWT base64url part

func EpochToHumanDate added in v0.0.3

func EpochToHumanDate(epochTime int) string

func GenerateLegacyToken

func GenerateLegacyToken(res *http.Response, username, password string) string

func GenerateOTP added in v0.0.3

func GenerateOTP(secret string) string

GenerateOTP generates a TOTP code for the given secret.

func PerformLogin added in v0.0.3

func PerformLogin(testServerURL string) string

func Remove added in v0.0.3

func Remove(a string, values []string) []string

func Setup2FA added in v0.0.3

func Setup2FA(testServerURL string, token string, t *testing.T) string

func Verify2FA added in v0.0.3

func Verify2FA(testServerURL string, otp string, token string, t *testing.T) string

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL