Smalldb  v0.0-177-g1a83180
 All Classes Namespaces Functions Variables Pages
Public Member Functions | List of all members
IAuth Interface Reference

Authenticator interface. More...

Inheritance diagram for IAuth:
Inheritance graph

Public Member Functions

 getUserId ()
 Get user's ID. More...
 
 getUserRole ()
 Get user's role. More...
 

Detailed Description

Authenticator interface.

State machine requires some basic informations about current user so it can determine whether or not it is allowed to trigger a transition or expose state machine state.

Member Function Documentation

getUserId ( )

Get user's ID.

User's ID is limited to single scalar value (any integer or string).

Returns
User's ID, or NULL when nobody is logged in.

Implemented in Auth.

getUserRole ( )

Get user's role.

Smalldb does not understand user roles, it can only check whether user's role is one of required values. User's role is global and it is not related to any instance of anything.

User is expected to have exactly one role.

Returns
User's role, or NULL when nobody is logged in or there are no roles.

Implemented in Auth.