methods

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: 21 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)

Disable2FA disables two-factor authentication for the user

func Get2FARecoveryCodes added in v0.0.3

func Get2FARecoveryCodes(c *gin.Context)

Get2FARecoveryCodes retrieves the recovery codes for the user

func Get2FAStatus added in v0.0.3

func Get2FAStatus(c *gin.Context)

Test2FAStatus checks if 2FA is enabled for the user

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 GetUserStatus added in v0.0.3

func GetUserStatus(username string) (string, error)

GetUserStatus retrieves the 2FA status for the user

func PhoneIslandTokenCheck added in v0.0.3

func PhoneIslandTokenCheck(c *gin.Context)

PhoneIslandTokenCheck checks if the user has a Phone Island API key

func PhoneIslandTokenLogin added in v0.0.3

func PhoneIslandTokenLogin(c *gin.Context)

PhoneIslandTokenLogin handles the login for Phone Island using a JWT token

func PhoneIslandTokenRemove added in v0.0.3

func PhoneIslandTokenRemove(c *gin.Context)

PhoneIslandTokenRemove removes the Phone Island API key for the user

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)

QRCode generates a QR code for the user to set up 2FA

func VerifyOTP added in v0.1.3

func VerifyOTP(c *gin.Context)

VerifyOTP verifies the OTP provided by the user

func VerifyUserPassword added in v0.2.0

func VerifyUserPassword(username, password string) bool

VerifyUserPassword verifies a user's password against NetCTI server

Types

This section is empty.

Jump to

Keyboard shortcuts

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