openDAQ
Open data acquisition platform
Factories

Detailed Description

Classes

struct  IUser
 An immutable structure which describes an openDAQ user. It holds username, password as a hash string and a list of groups assigned to the user. More...
 
struct  IUserLock
 This class manages the lock state of an object, usually a device. A device can be locked either with a specific user or without one. If the device is locked with a specific user, only that user can unlock it. If the device is locked without a user, any user can unlock it. More...
 
class  UserPtr
 An immutable structure which describes an openDAQ user. It holds username, password as a hash string and a list of groups assigned to the user. More...
 
class  UserLockPtr
 This class manages the lock state of an object, usually a device. A device can be locked either with a specific user or without one. If the device is locked with a specific user, only that user can unlock it. If the device is locked without a user, any user can unlock it. More...
 

Functions

AuthenticationProviderPtr AuthenticationProvider ()
 Creates a default authentication provider with only anonymous authentication allowed.
 
AuthenticationProviderPtr AuthenticationProvider (Bool allowAnonymous)
 Creates an empty authentication provider without any user. More...
 
AuthenticationProviderPtr StaticAuthenticationProvider (Bool allowAnonymous, const ListPtr< IUser > &users)
 Creates an authentication provider out of static list of users. More...
 
AuthenticationProviderPtr JsonFileAuthenticationProvider (const StringPtr &filename)
 Creates an authentication provider out of static json file. More...
 
AuthenticationProviderPtr JsonStringAuthenticationProvider (const StringPtr &jsonString)
 Creates an authentication provider out of static json string. More...
 
UserPtr User (const StringPtr &username, const StringPtr &passwordHash, const ListPtr< IString > groups=nullptr)
 Creates a immutable user object with provided arguments. More...
 

Function Documentation

◆ AuthenticationProvider()

AuthenticationProviderPtr AuthenticationProvider ( Bool  allowAnonymous)
inline

Creates an empty authentication provider without any user.

Parameters
allowAnonymousTrue if anonymous authentication is allowed.

◆ JsonFileAuthenticationProvider()

AuthenticationProviderPtr JsonFileAuthenticationProvider ( const StringPtr filename)
inline

Creates an authentication provider out of static json file.

Parameters
filenameFile path to json file contianung a list of user objects.

◆ JsonStringAuthenticationProvider()

AuthenticationProviderPtr JsonStringAuthenticationProvider ( const StringPtr jsonString)
inline

Creates an authentication provider out of static json string.

Parameters
jsonStringList of users and their groups encoded as json string.

◆ StaticAuthenticationProvider()

AuthenticationProviderPtr StaticAuthenticationProvider ( Bool  allowAnonymous,
const ListPtr< IUser > &  users 
)
inline

Creates an authentication provider out of static list of users.

Parameters
allowAnonymousTrue if anonymous authentication is allowed.
usersList of user objects.

◆ User()

UserPtr User ( const StringPtr username,
const StringPtr passwordHash,
const ListPtr< IString groups = nullptr 
)
inline

Creates a immutable user object with provided arguments.

Parameters
usernameUsername of a user.
passwordHashthe user's password, which can either be in plain text or hashed using the Bcrypt algorithm. Hashed passwords should follow the Modular Crypt Format. For security purposes, hashed passwords are preferred.
groupsThe list of group IDs which the user belongs to.