Auth Key that is used by the Authentication System. More...
Public Types | |
| enum | AuthSource { AUTH_SOURCE_INTERNAL = 100, AUTH_SOURCE_UI = 70, AUTH_SOURCE_NETWORK = 50, AUTH_SOURCE_UNKNOWN = 0 } |
| Indicates how a given message originated. More... | |
| enum | AuthRole { AUTH_ROLE_OWNER = 100, AUTH_ROLE_GROUP_ADMIN = 51, AUTH_ROLE_GROUP = 50, AUTH_ROLE_GUEST = 30, AUTH_ROLE_ANONYMOUS = 0 } |
| Indicates the role of the message. More... | |
| enum | AuthLocation { AUTH_LOCATION_LOCAL = 100, AUTH_LOCATION_TRUSTED = 70, AUTH_LOCATION_REMOTEACCESS = 50, AUTH_LOCATION_REMOTE = 0 } |
| Indicates where the message originated. More... | |
Public Member Functions | |
| AuthKey () | |
| Ctor. | |
| AuthKey (AuthSource a_source, AuthRole a_role, AuthLocation a_location, const std::string &a_authContext="") | |
| AuthKey (AuthKey &a_key) | |
| ~AuthKey () | |
| Dtor. | |
| AuthKey::AuthSource | authSource () const |
| Returns the source of this message. | |
| AuthKey::AuthRole | authRole () const |
| Returns the Authentication Role of this message. | |
| AuthKey::AuthLocation | authLocation () const |
| Returns the originating location of the message. | |
| const std::string & | authContext () const |
| Returns the associated auth context. | |
| bool | isValid () const |
| Returns whether the given Auth Key is valid. | |
| AuthKey & | operator= (const AuthKey &a_authKey) |
| Assignment operator. | |
Static Public Member Functions | |
| static std::string | authSourceAsString (AuthKey::AuthSource a_source) |
| Returns the source of this message as a string. | |
| static AuthKey::AuthSource | authSourceFromString (const std::string &a_source) |
| Returns the Authentication Source of this message given a string. | |
| static std::string | authRoleAsString (AuthKey::AuthRole a_role) |
| Returns the Authentication Role of this message as a string. | |
| static AuthKey::AuthRole | authRoleFromString (const std::string &a_role) |
| Returns the Authentication Role of this message given a string. | |
| static std::string | authLocationAsString (AuthKey::AuthLocation a_location) |
| Returns the location of this message as a string. | |
| static AuthKey::AuthLocation | authLocationFromString (const std::string &a_source) |
| Returns the location from a given string. | |
Auth Key that is used by the Authentication System.
An Auth Key is part of every single message that is sent across the network, as well as sent via the HTTP API.
It stores the credentials for a given message
Indicates where the message originated.
Note that values of the enums are carefully set so that higher values indicate higher requirements. This is done so we can do comparisons etc
Indicates the role of the message.
This indicates the highest authentication Role a given message can get. Depending upon the Role the core/application can decide to allow/disallow certain things
Note that values of the enums are carefully set so that higher values indicate higher requirements. This is done so we can do comparisons etc
Indicates how a given message originated.
Note that values of the enums are carefully set so that higher values indicate higher requirements. This is done so we can do comparisons etc.
| Tonido::Data::AuthKey::AuthKey | ( | ) |
Ctor.
details if needed ...
| Tonido::Data::AuthKey::~AuthKey | ( | ) |
Dtor.
details if needed ...
| const std::string & Tonido::Data::AuthKey::authContext | ( | ) | const |
Returns the associated auth context.
| AuthKey::AuthLocation Tonido::Data::AuthKey::authLocation | ( | ) | const |
Returns the originating location of the message.
| std::string Tonido::Data::AuthKey::authLocationAsString | ( | AuthKey::AuthLocation | a_location | ) | [static] |
Returns the location of this message as a string.
| [in] | a_location | authentication location |
| AuthKey::AuthLocation Tonido::Data::AuthKey::authLocationFromString | ( | const std::string & | a_source | ) | [static] |
Returns the location from a given string.
| [in] | a_source | location |
| AuthKey::AuthRole Tonido::Data::AuthKey::authRole | ( | ) | const |
Returns the Authentication Role of this message.
| std::string Tonido::Data::AuthKey::authRoleAsString | ( | AuthKey::AuthRole | a_role | ) | [static] |
Returns the Authentication Role of this message as a string.
| [in] | a_role | authentication role |
| AuthKey::AuthRole Tonido::Data::AuthKey::authRoleFromString | ( | const std::string & | a_role | ) | [static] |
Returns the Authentication Role of this message given a string.
| [in] | a_role | authentication role |
| AuthKey::AuthSource Tonido::Data::AuthKey::authSource | ( | ) | const |
Returns the source of this message.
| std::string Tonido::Data::AuthKey::authSourceAsString | ( | AuthKey::AuthSource | a_source | ) | [static] |
Returns the source of this message as a string.
| AuthKey::AuthSource Tonido::Data::AuthKey::authSourceFromString | ( | const std::string & | a_source | ) | [static] |
Returns the Authentication Source of this message given a string.
| [in] | a_source | authentication source |
| bool Tonido::Data::AuthKey::isValid | ( | ) | const |
Returns whether the given Auth Key is valid.