Legrand / Raritan / Server Technology Xerus™ JSON-RPC API
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
usermgmt::UserManager Interface Reference

User manager interface More...

Public Member Functions

vector< string > getAccountNames ()
 Get a list of account names available on the system. More...
 
int createAccount (in string username, in string password)
 Create a new account. More...
 
int renameAccount (in string username, in string newUsername)
 Rename an account. More...
 
int deleteAccount (in string username)
 Deletes an account. More...
 
vector< AccountgetAllAccounts ()
 Get information about all available user accounts. More...
 
int createAccountFull (in string username, in string password, in UserInfo info)
 Create a new account with defined settings. More...
 
vector< AccountgetAccountsByRole (in string roleName)
 Get a list of accounts that have a given role. More...
 
Preferences getDefaultPreferences ()
 Get default user preferences. More...
 
int setDefaultPreferences (in Preferences prefs)
 Set default user preferences. More...
 

Public Attributes

constant int ERR_USER_DOESNT_EXIST = 1
 A user with the given name does not exist. More...
 
constant int ERR_USER_NOT_DELETABLE = 2
 The user is not deletable. More...
 
constant int ERR_USER_ALREADY_EXISTS = 1
 A user with the given name already exists. More...
 
constant int ERR_MAX_USERS_REACHED = 2
 Maximum number of users reached. More...
 
constant int ERR_PASSWORD_TOO_SHORT_FOR_SNMP = 3
 The password is too short to be used as SNMPv3 passphrase. More...
 
constant int ERR_INVALID_VALUE = 4
 Invalid arguments. More...
 
constant int ERR_PASSWORD_EMPTY = 5
 The password must not be empty. More...
 
constant int ERR_PASSWORD_TOO_SHORT = 6
 The password is too short. More...
 
constant int ERR_PASSWORD_TOO_LONG = 7
 The password is too long. More...
 
constant int ERR_PASSWORD_CTRL_CHARS = 8
 The password must not contain control characters. More...
 
constant int ERR_PASSWORD_NEED_LOWER = 9
 The password must contain at least one lower-case character. More...
 
constant int ERR_PASSWORD_NEED_UPPER = 10
 The password must contain at least one upper-case character. More...
 
constant int ERR_PASSWORD_NEED_NUMERIC = 11
 The password must contain at least one numeric character. More...
 
constant int ERR_PASSWORD_NEED_SPECIAL = 12
 The password must contain at least one special character. More...
 
constant int ERR_SSH_PUBKEY_DATA_TOO_LARGE = 14
 The ssh public key data is too large. More...
 
constant int ERR_SSH_PUBKEY_INVALID = 15
 The ssh public key is invalid. More...
 
constant int ERR_SSH_PUBKEY_NOT_SUPPORTED = 16
 The ssh public key is not supported. More...
 
constant int ERR_SSH_RSA_PUBKEY_TOO_SHORT = 17
 The ssh RSA public key is too short. More...
 
constant int ERR_USERNAME_INVALID = 18
 The user name contains one or more invalid character(s). More...
 
constant int ERR_NEW_USER_ALREADY_EXISTS = 19
 A user with the new (renamed) user name already exists. More...
 

Detailed Description

User manager interface

Definition at line 61 of file UserManager.idl.

Member Function Documentation

◆ createAccount()

int usermgmt::UserManager::createAccount ( in string  username,
in string  password 
)

Create a new account.

Parameters
usernameNew user name
passwordNew password
Returns
0 if OK
1 if a user with the given name already exists
2 if the maximum number of users is reached
3 SNMPv3 USM is activated for the user and the password shall be used as auth passphrase. For this case, the password is too short (must be at least 8 characters).
5 The password must not be empty.
6 The password is too short.
7 The password is too long.
8 The password must not contain control characters.
9 The password has to contain at least one lower case character.
10 The password has to contain at least one upper case character.
11 The password has to contain at least one numeric character.
12 The password has to contain at least one printable special character.
18 if the user name is invalid.

◆ createAccountFull()

int usermgmt::UserManager::createAccountFull ( in string  username,
in string  password,
in UserInfo  info 
)

Create a new account with defined settings.

Parameters
usernameNew user name
passwordNew password
infoNew user information
Returns
0 if OK
1 if a user with the given name already exists
2 if the maximum number of users is reached
3 SNMPv3 USM is activated for the user and the password shall be used as auth passphrase. For this case, the password is too short (must be at least 8 characters).
4 if any value in the user info is invalid.
5 The password must not be empty.
6 The password is too short.
7 The password is too long.
8 The password must not contain control characters.
9 The password has to contain at least one lower case character.
10 The password has to contain at least one upper case character.
11 The password has to contain at least one numeric character.
12 The password has to contain at least one printable special character.
14 The ssh public key data is too large.
15 The ssh public key is invalid.
16 The ssh public key is not supported.
17 The ssh RSA public key is too short.
18 if the user name is invalid.

◆ deleteAccount()

int usermgmt::UserManager::deleteAccount ( in string  username)

Deletes an account.

Parameters
usernameName of user to delete
Returns
0 if OK
1 if a user with the given name does not exist
2 if the user cannot be deleted

◆ getAccountNames()

vector< string > usermgmt::UserManager::getAccountNames ( )

Get a list of account names available on the system.

Returns
List of account names

◆ getAccountsByRole()

vector< Account > usermgmt::UserManager::getAccountsByRole ( in string  roleName)

Get a list of accounts that have a given role.

Parameters
roleNameRole name
Returns
List of accounts

◆ getAllAccounts()

vector< Account > usermgmt::UserManager::getAllAccounts ( )

Get information about all available user accounts.

Returns
List of accounts

◆ getDefaultPreferences()

Preferences usermgmt::UserManager::getDefaultPreferences ( )

Get default user preferences.

Returns
Default user preferences.

◆ renameAccount()

int usermgmt::UserManager::renameAccount ( in string  username,
in string  newUsername 
)

Rename an account.

Parameters
usernameCurrent name of user
newUsernameNew name of the user
Returns
0 if OK
1 if a user with the given name does not exist
19 if a user with the new name already exists

◆ setDefaultPreferences()

int usermgmt::UserManager::setDefaultPreferences ( in Preferences  prefs)

Set default user preferences.

Parameters
prefsDefault user preferences.
Returns
0 if OK

Member Data Documentation

◆ ERR_INVALID_VALUE

constant int usermgmt::UserManager::ERR_INVALID_VALUE = 4

Invalid arguments.

Definition at line 69 of file UserManager.idl.

◆ ERR_MAX_USERS_REACHED

constant int usermgmt::UserManager::ERR_MAX_USERS_REACHED = 2

Maximum number of users reached.

Definition at line 67 of file UserManager.idl.

◆ ERR_NEW_USER_ALREADY_EXISTS

constant int usermgmt::UserManager::ERR_NEW_USER_ALREADY_EXISTS = 19

A user with the new (renamed) user name already exists.

Definition at line 83 of file UserManager.idl.

◆ ERR_PASSWORD_CTRL_CHARS

constant int usermgmt::UserManager::ERR_PASSWORD_CTRL_CHARS = 8

The password must not contain control characters.

Definition at line 73 of file UserManager.idl.

◆ ERR_PASSWORD_EMPTY

constant int usermgmt::UserManager::ERR_PASSWORD_EMPTY = 5

The password must not be empty.

Definition at line 70 of file UserManager.idl.

◆ ERR_PASSWORD_NEED_LOWER

constant int usermgmt::UserManager::ERR_PASSWORD_NEED_LOWER = 9

The password must contain at least one lower-case character.

Definition at line 74 of file UserManager.idl.

◆ ERR_PASSWORD_NEED_NUMERIC

constant int usermgmt::UserManager::ERR_PASSWORD_NEED_NUMERIC = 11

The password must contain at least one numeric character.

Definition at line 76 of file UserManager.idl.

◆ ERR_PASSWORD_NEED_SPECIAL

constant int usermgmt::UserManager::ERR_PASSWORD_NEED_SPECIAL = 12

The password must contain at least one special character.

Definition at line 77 of file UserManager.idl.

◆ ERR_PASSWORD_NEED_UPPER

constant int usermgmt::UserManager::ERR_PASSWORD_NEED_UPPER = 10

The password must contain at least one upper-case character.

Definition at line 75 of file UserManager.idl.

◆ ERR_PASSWORD_TOO_LONG

constant int usermgmt::UserManager::ERR_PASSWORD_TOO_LONG = 7

The password is too long.

Definition at line 72 of file UserManager.idl.

◆ ERR_PASSWORD_TOO_SHORT

constant int usermgmt::UserManager::ERR_PASSWORD_TOO_SHORT = 6

The password is too short.

Definition at line 71 of file UserManager.idl.

◆ ERR_PASSWORD_TOO_SHORT_FOR_SNMP

constant int usermgmt::UserManager::ERR_PASSWORD_TOO_SHORT_FOR_SNMP = 3

The password is too short to be used as SNMPv3 passphrase.

Definition at line 68 of file UserManager.idl.

◆ ERR_SSH_PUBKEY_DATA_TOO_LARGE

constant int usermgmt::UserManager::ERR_SSH_PUBKEY_DATA_TOO_LARGE = 14

The ssh public key data is too large.

Definition at line 78 of file UserManager.idl.

◆ ERR_SSH_PUBKEY_INVALID

constant int usermgmt::UserManager::ERR_SSH_PUBKEY_INVALID = 15

The ssh public key is invalid.

Definition at line 79 of file UserManager.idl.

◆ ERR_SSH_PUBKEY_NOT_SUPPORTED

constant int usermgmt::UserManager::ERR_SSH_PUBKEY_NOT_SUPPORTED = 16

The ssh public key is not supported.

Definition at line 80 of file UserManager.idl.

◆ ERR_SSH_RSA_PUBKEY_TOO_SHORT

constant int usermgmt::UserManager::ERR_SSH_RSA_PUBKEY_TOO_SHORT = 17

The ssh RSA public key is too short.

Definition at line 81 of file UserManager.idl.

◆ ERR_USER_ALREADY_EXISTS

constant int usermgmt::UserManager::ERR_USER_ALREADY_EXISTS = 1

A user with the given name already exists.

Definition at line 66 of file UserManager.idl.

◆ ERR_USER_DOESNT_EXIST

constant int usermgmt::UserManager::ERR_USER_DOESNT_EXIST = 1

A user with the given name does not exist.

Definition at line 63 of file UserManager.idl.

◆ ERR_USER_NOT_DELETABLE

constant int usermgmt::UserManager::ERR_USER_NOT_DELETABLE = 2

The user is not deletable.

Definition at line 64 of file UserManager.idl.

◆ ERR_USERNAME_INVALID

constant int usermgmt::UserManager::ERR_USERNAME_INVALID = 18

The user name contains one or more invalid character(s).

Definition at line 82 of file UserManager.idl.


The documentation for this interface was generated from the following file: