High Performance OPC UA Server SDK  1.2.0.193
authentication

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...
 

Detailed Description

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.

Function Documentation

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.

Parameters
sessionThe session to be activated.
channelThe channel of the session. Note: This pointer is only valid in the synchronous call.
tokenToken the user provides.
tokensignatureTokensignature of the user.
channel_changedIndicates 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.
resultResult of the authentication check.
usernameIdentifier for the user being authenticated, must be set by the authentication backend on success and is used for authorization.
ctxtContext to be passed to uasession_activatesesion_finish().
Returns
UA_EASYNC in case of async finish, for other return values 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.

Parameters
max_usersMaximum number of users, that can be added.
Returns
0 on success or errorcode on failure.
int ua_authentication_load_from_file ( const char *  passwd_file)

Load user authentication information from a file.

Parameters
passwd_fileName of the file to load authentication information from.
Returns
0 on success or errorcode on failure.