Holds the server credentials for the user logging in.
Available in version 7.1 of Decoder SDK. Requires a server version greater than 6.0
Two factor authentication (MFA) requires a supporting server
#include <Credentials.h>
Public Member Functions | |
| DB_EDGEVIS_SDK | Credentials (const std::wstring &username, const std::wstring &password, const std::wstring &new_password=L"") |
| Constructor for the Credentials object. | |
| DB_EDGEVIS_SDK void | SetUsername (const std::wstring &username) |
| Sets the username for logging in to the server. | |
| DB_EDGEVIS_SDK void | SetSSOOpenIdAuthCode (const std::wstring &ssoOpenIdAuthCode) |
| Sets the SSO OpenId auth code for logging in to the server. | |
| DB_EDGEVIS_SDK void | SetPassword (const std::wstring &password) |
| Sets the password for logging in to the server. | |
| DB_EDGEVIS_SDK void | SetNewPassword (const std::wstring &new_password) |
| Sets the new password to set when logging in to the server when a password reset is required. | |
| DB_EDGEVIS_SDK bool | SetMFAPasscode (const std::wstring &otp) |
| Sets the one time two factor authentication password for this login. | |
| DB_EDGEVIS_SDK void | SetMFAEmergencyPasscode (const std::wstring &emergency_passcode) |
| Sets the two factor authentication emergency passcode for this login. | |
| DB_EDGEVIS_SDK void | SetDevicePassword (const std::wstring &password) |
| Sets the device password for this login. | |
| DB_EDGEVIS_SDK EdgeVisDecoderSDK::Credentials::Credentials | ( | const std::wstring & | username, |
| const std::wstring & | password, | ||
| const std::wstring & | new_password = L"" ) |
Constructor for the Credentials object.
| username | The username to log in with. NOTE: if using an app specific password to log in to an MFA enabled server the app specific password should be appended to the username with a colon separator (eg. username:appspecificpassword) The app specific password can be generated in the server web UI if required. |
| password | The password to log in with. NOTE: if the password contains \\endiskip characters they must be escaped before providing to the Decoder SDK by prefixing with another \\endiskip (ie. a password of 5V^=\P4kK.sP must be provided as 5V^=\\P4kK.sP) |
| new_password | The new password to set when logging in. This will be ignored if the user account does not require a password reset. If on attempting to connect to a server an OpResult of OR_NewPasswordRequired is returned you must set a new password. This new password must meet the requirements as set down by the PasswordResetInfo class. |
| DB_EDGEVIS_SDK void EdgeVisDecoderSDK::Credentials::SetUsername | ( | const std::wstring & | username | ) |
Sets the username for logging in to the server.
| username | The username to log in with. NOTE: if using an app specific password to log in to an MFA enabled server the app specific password should be appended to the username with a colon separator (eg. username:appspecificpassword) The app specific password can be generated in the server web UI if required. |
| DB_EDGEVIS_SDK void EdgeVisDecoderSDK::Credentials::SetSSOOpenIdAuthCode | ( | const std::wstring & | ssoOpenIdAuthCode | ) |
Sets the SSO OpenId auth code for logging in to the server.
| username | The SSO OpenId-enabled auth code to log in with. |
| DB_EDGEVIS_SDK void EdgeVisDecoderSDK::Credentials::SetPassword | ( | const std::wstring & | password | ) |
Sets the password for logging in to the server.
| password | The password to log in with. |
| DB_EDGEVIS_SDK void EdgeVisDecoderSDK::Credentials::SetNewPassword | ( | const std::wstring & | new_password | ) |
Sets the new password to set when logging in to the server when a password reset is required.
| new_password | The new password to set when logging in. This will be ignored if the user account does not require a password reset. NOTE: if the password contains \\endiskip characters they must be escaped before providing to the Decoder SDK by prefixing with another \\endiskip (ie. a password of 5V^=\P4kK.sP must be provided as 5V^=\\P4kK.sP) |
| DB_EDGEVIS_SDK bool EdgeVisDecoderSDK::Credentials::SetMFAPasscode | ( | const std::wstring & | otp | ) |
Sets the one time two factor authentication password for this login.
This is typically a 6 digit number provided by a mobile application. If MFA is required, set only one of:
| otp | The one time MFA password |
| DB_EDGEVIS_SDK void EdgeVisDecoderSDK::Credentials::SetMFAEmergencyPasscode | ( | const std::wstring & | emergency_passcode | ) |
Sets the two factor authentication emergency passcode for this login.
The emergency passcodes are provided during 2FA enrolment. If MFA is required, set only one of:
| emergency_passcode | The MFA emergency password |
| DB_EDGEVIS_SDK void EdgeVisDecoderSDK::Credentials::SetDevicePassword | ( | const std::wstring & | password | ) |
Sets the device password for this login.
A device password may be stored on a trusted device as an alternative to supplying a one-time password (OTP) for connecting to two-factor authentication enabled servers. If MFA is required, set only one of:
| password | The device password |