methods

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2025 License: GPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthenticateAPIKey added in v0.0.3

func AuthenticateAPIKey(username, apiKey string) bool

AuthenticateAPIKey returns true if the API key matches the stored key for the user, false otherwise

func DeleteExpiredTokens added in v0.0.3

func DeleteExpiredTokens()

func Disable2FA added in v0.0.3

func Disable2FA(c *gin.Context)

func Enable2FA added in v0.0.3

func Enable2FA(username string) bool

func Get2FARecoveryCodes added in v0.0.3

func Get2FARecoveryCodes(c *gin.Context)

func Get2FAStatus added in v0.0.3

func Get2FAStatus(c *gin.Context)

func GetPhoneIslandToken added in v0.0.3

func GetPhoneIslandToken(jwtToken string, onlyToken bool) (string, error)

Return the PhoneIslandToken from ApiKeyData given a JWT token string

func GetRecoveryCodes added in v0.0.3

func GetRecoveryCodes(username string) []string

func GetUserSecret added in v0.0.3

func GetUserSecret(username string) string

func GetUserStatus added in v0.0.3

func GetUserStatus(username string) (string, error)

func OTPVerify added in v0.0.3

func OTPVerify(c *gin.Context)

func PhoneIslandTokenCheck added in v0.0.3

func PhoneIslandTokenCheck(c *gin.Context)

func PhoneIslandTokenLogin added in v0.0.3

func PhoneIslandTokenLogin(c *gin.Context)

func PhoneIslandTokenRemove added in v0.0.3

func PhoneIslandTokenRemove(c *gin.Context)

func ProxyV1Request

func ProxyV1Request(c *gin.Context, path string)

ProxyV1Request forwards requests to the legacy V1 API

func QRCode added in v0.0.3

func QRCode(c *gin.Context)

func SetUserSecret added in v0.0.3

func SetUserSecret(username string, secret string) (bool, string)

func UpdateRecoveryCodes added in v0.0.3

func UpdateRecoveryCodes(username string, codes []string) bool

func Verify2FA added in v0.0.3

func Verify2FA(username, otp string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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