High Performance OPC UA Server SDK
1.2.1.203
|
Interface for implementing an authentication backend. More...
Modules | |
internal | |
For more information on the internal authentication backend and usage examples see Internal Backend. | |
Functions | |
int | ua_authentication_init (uint32_t max_users) |
Initialize structures needed for managing user authentication. More... | |
void | ua_authentication_clear (void) |
Clear structures needed for managing user authentication. More... | |
int | ua_authenticate_user (struct uasession_session *session, struct uasession_channel *channel, struct ua_extensionobject *token, struct ua_signaturedata *tokensignature, bool channel_changed, ua_statuscode *result, struct ua_string *username, void *ctxt) |
Authenticate a user who wants to activate a session. More... | |
int | ua_authentication_load_from_file (const char *passwd_file) |
Load user authentication information from a file. More... | |
Interface for implementing an authentication backend.
The functions declared here must be implemented by every authentication backend and are mainly intended for use by the SDK.
Adding and Removing users is backend specific and thus implemented in the backends like internal.
int ua_authenticate_user | ( | struct uasession_session * | session, |
struct uasession_channel * | channel, | ||
struct ua_extensionobject * | token, | ||
struct ua_signaturedata * | tokensignature, | ||
bool | channel_changed, | ||
ua_statuscode * | result, | ||
struct ua_string * | username, | ||
void * | ctxt | ||
) |
Authenticate a user who wants to activate a session.
session | The session to be activated. |
channel | The channel of the session. Note: This pointer is only valid in the synchronous call. |
token | Token the user provides. |
tokensignature | Tokensignature of the user. |
channel_changed | Indicates if the channel changed between this activate and the last activate. If true the backend has to make sure the same authentication policy is used. |
result | Result of the authentication check. |
username | Identifier for the user being authenticated, must be set by the authentication backend on success and is used for authorization. |
ctxt | Context to be passed to uasession_activatesesion_finish(). |
result
will be evaluated. void ua_authentication_clear | ( | void | ) |
Clear structures needed for managing user authentication.
All users wil be removed and no user will be able to authenticate any longer.
int ua_authentication_init | ( | uint32_t | max_users | ) |
Initialize structures needed for managing user authentication.
max_users | Maximum number of users, that can be added. |
int ua_authentication_load_from_file | ( | const char * | passwd_file | ) |
Load user authentication information from a file.
passwd_file | Name of the file to load authentication information from. |