S2OPC OPCUA Toolkit
|
Defines the logged-in (server-side) user. More...
Go to the source code of this file.
Typedefs | |
typedef struct SOPC_User | SOPC_User |
Logged in (successfully) user structure. | |
Functions | |
const SOPC_User * | SOPC_User_GetLocal (void) |
Returns a local user, which shall not be freed nor be modified. | |
bool | SOPC_User_IsLocal (const SOPC_User *user) |
Returns true if the user is a local user. | |
const SOPC_User * | SOPC_User_GetAnonymous (void) |
Returns an anonymous user, which shall not be freed nor be modified. | |
bool | SOPC_User_IsAnonymous (const SOPC_User *user) |
Returns true if the user is an anonymous user. | |
SOPC_User * | SOPC_User_CreateUsername (SOPC_String *username) |
Creates a SOPC_User which has a usename. | |
SOPC_User * | SOPC_User_CreateCertificate (SOPC_ByteString *certificateData) |
Creates a SOPC_User which has a X509 certificate. | |
const SOPC_String * | SOPC_User_GetUsername (const SOPC_User *user) |
Returns a reference to the internal storage of the username. The user must be a user with a username. | |
bool | SOPC_User_IsUsername (const SOPC_User *user) |
Returns true if the type of the user is username. | |
const SOPC_ByteString * | SOPC_User_GetCertificate (const SOPC_User *user) |
Returns a reference to the internal storage of the DER certificate. The user shall be a user with a certificate. | |
const SOPC_String * | SOPC_User_GetCertificate_Thumbprint (const SOPC_User *user) |
Returns a reference to the internal storage of the thumbprint certificate (SHA1 hexadecimal format). The user shall be a user with a certificate. | |
bool | SOPC_User_IsCertificate (const SOPC_User *user) |
Returns true if the type of the user is certificate. | |
bool | SOPC_User_Equal (const SOPC_User *left, const SOPC_User *right) |
Returns true if the users are the same type and content (if applicable) | |
void | SOPC_User_Free (SOPC_User **ppUser) |
User deletion, should not be called on local and anonymous users. | |
SOPC_User * | SOPC_User_Copy (const SOPC_User *user) |
Copy the given user. | |
const char * | SOPC_User_ToCString (const SOPC_User *user) |
Returns the user as a const C string description: | |
Defines the logged-in (server-side) user.
The user bears data specific to its type. The following user types are supported:
SOPC_ToolkitServer_AsyncLocalServiceRequest
), and has no data,OpcUa_AnonymousIdentityToken
and has no data,OpcUa_UserNameIdentityToken
and has a username (see SOPC_User_GetUsername
). const SOPC_User * SOPC_User_GetLocal | ( | void | ) |
Returns a local user, which shall not be freed nor be modified.
bool SOPC_User_IsLocal | ( | const SOPC_User * | user | ) |
Returns true if the user is a local user.
const SOPC_User * SOPC_User_GetAnonymous | ( | void | ) |
Returns an anonymous user, which shall not be freed nor be modified.
bool SOPC_User_IsAnonymous | ( | const SOPC_User * | user | ) |
Returns true if the user is an anonymous user.
SOPC_User * SOPC_User_CreateUsername | ( | SOPC_String * | username | ) |
Creates a SOPC_User
which has a usename.
username | A valid pointer to the username of the user to create. |
SOPC_User
if successful, otherwise NULL. SOPC_User * SOPC_User_CreateCertificate | ( | SOPC_ByteString * | certificateData | ) |
Creates a SOPC_User
which has a X509 certificate.
certificateData | A valid pointer to the certificate of the user to create. |
SOPC_User
if successful, otherwise NULL. const SOPC_String * SOPC_User_GetUsername | ( | const SOPC_User * | user | ) |
Returns a reference to the internal storage of the username. The user must be a user with a username.
bool SOPC_User_IsUsername | ( | const SOPC_User * | user | ) |
Returns true if the type of the user is username.
const SOPC_ByteString * SOPC_User_GetCertificate | ( | const SOPC_User * | user | ) |
Returns a reference to the internal storage of the DER certificate. The user shall be a user with a certificate.
const SOPC_String * SOPC_User_GetCertificate_Thumbprint | ( | const SOPC_User * | user | ) |
Returns a reference to the internal storage of the thumbprint certificate (SHA1 hexadecimal format). The user shall be a user with a certificate.
bool SOPC_User_IsCertificate | ( | const SOPC_User * | user | ) |
Returns true if the type of the user is certificate.
Returns true if the users are the same type and content (if applicable)
void SOPC_User_Free | ( | SOPC_User ** | ppUser | ) |
User deletion, should not be called on local and anonymous users.
const char * SOPC_User_ToCString | ( | const SOPC_User * | user | ) |
Returns the user as a const C string description: