Documentation
¶
Index ¶
- func AdminImportPhonebookCSV(c *gin.Context)
- func AdminReloadProfiles(c *gin.Context)
- func CheckPersistentToken(c *gin.Context)
- func CreatePersistentToken(c *gin.Context)
- func DeleteExpiredTokens()
- func Disable2FA(c *gin.Context)
- func Get2FARecoveryCodes(c *gin.Context)
- func Get2FAStatus(c *gin.Context)
- func GetUserStatus(username string) (string, error)
- func ImportPhonebookCSV(c *gin.Context)
- func ProxyV1Request(c *gin.Context, path string, allowAnonymous bool)
- func QRCode(c *gin.Context)
- func RemovePersistentToken(c *gin.Context)
- func VerifyOTP(c *gin.Context)
- func VerifyUserPassword(username, password string) bool
- type Endpoints
- type Extension
- type PhonebookImportResponse
- type UserInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AdminImportPhonebookCSV ¶ added in v0.4.5
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
AdminReloadProfiles reloads profiles and users globally via super admin API endpoint
func CheckPersistentToken ¶ added in v0.4.5
CheckPersistentToken checks if at least one valid integration token exists for the requested audience.
func CreatePersistentToken ¶ added in v0.4.5
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
Disable2FA disables two-factor authentication for the user
func Get2FARecoveryCodes ¶ added in v0.0.3
Get2FARecoveryCodes retrieves the recovery codes for the user
func Get2FAStatus ¶ added in v0.0.3
Test2FAStatus checks if 2FA is enabled for the user
func GetUserStatus ¶ added in v0.0.3
GetUserStatus retrieves the 2FA status for the user
func ImportPhonebookCSV ¶ added in v0.4.5
ImportPhonebookCSV handles CSV phonebook imports for the authenticated user. Requires JWT bearer token authentication.
func ProxyV1Request ¶
ProxyV1Request forwards requests to the legacy V1 API
func RemovePersistentToken ¶ added in v0.4.5
RemovePersistentToken revokes all integration JWTs for the requested audience.
func VerifyUserPassword ¶ added in v0.2.0
VerifyUserPassword verifies a user's password against NetCTI server
Types ¶
type Endpoints ¶ added in v0.3.0
type Endpoints struct {
Extension []Extension `json:"extension"`
MainExtension []Extension `json:"mainextension"`
}
Endpoints represents endpoint types (only extension and mainextension are used)
type Extension ¶ added in v0.3.0
type Extension struct {
ID string `json:"id"`
}
Extension represents a phone extension (only ID is used)
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
type UserInfo ¶ added in v0.3.0
type UserInfo struct {
Name string `json:"name"`
Username string `json:"username"`
Endpoints Endpoints `json:"endpoints"`
// Computed fields for easier access
DisplayName string `json:"-"`
PhoneNumbers []string `json:"-"`
}
UserInfo represents user information from the API (only fields we need)
func GetUserInfo ¶ added in v0.3.0
GetUserInfo retrieves user information from V1 API using the provided token