methods

package
v0.4.6 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2026 License: GPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AdminImportPhonebookCSV added in v0.4.5

func AdminImportPhonebookCSV(c *gin.Context)

AdminImportPhonebookCSV handles CSV phonebook imports for admin users. Admin can import contacts into any target user's phonebook by specifying the username form field. Requires super admin bearer token authentication.

func AdminReloadProfiles added in v0.4.5

func AdminReloadProfiles(c *gin.Context)

AdminReloadProfiles reloads profiles and users globally via super admin API endpoint

func CheckPersistentToken added in v0.4.5

func CheckPersistentToken(c *gin.Context)

CheckPersistentToken checks if at least one valid integration token exists for the requested audience.

func CreatePersistentToken added in v0.4.5

func CreatePersistentToken(c *gin.Context)

CreatePersistentToken creates a JWT integration token for the requested audience.

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

func GetUserStatus(username string) (string, error)

GetUserStatus retrieves the 2FA status for the user

func ImportPhonebookCSV added in v0.4.5

func ImportPhonebookCSV(c *gin.Context)

ImportPhonebookCSV handles CSV phonebook imports for the authenticated user. Requires JWT bearer token authentication.

func PhoneIslandTokenCheck added in v0.0.3

func PhoneIslandTokenCheck(c *gin.Context)

PhoneIslandTokenCheck is a legacy compatibility endpoint. Historically this endpoint checked the phone-island integration token existence.

func PhoneIslandTokenLogin added in v0.0.3

func PhoneIslandTokenLogin(c *gin.Context)

PhoneIslandTokenLogin is a legacy compatibility endpoint. It maps legacy subtype values to the new persistent token audiences.

func PhoneIslandTokenRemove added in v0.0.3

func PhoneIslandTokenRemove(c *gin.Context)

PhoneIslandTokenRemove is a legacy compatibility endpoint. It maps legacy subtype values to the new persistent token audiences.

func ProxyV1Request

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

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 RemovePersistentToken added in v0.4.5

func RemovePersistentToken(c *gin.Context)

RemovePersistentToken revokes all integration JWTs for the requested audience.

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

type PhonebookImportResponse added in v0.4.5

type PhonebookImportResponse struct {
	Message       string   `json:"message"`
	TotalRows     int      `json:"total_rows"`
	ImportedRows  int      `json:"imported_rows"`
	FailedRows    int      `json:"failed_rows"`
	SkippedRows   int      `json:"skipped_rows"`
	ErrorMessages []string `json:"error_messages,omitempty"`
}

PhonebookImportResponse represents the response from a CSV import

Jump to

Keyboard shortcuts

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