Public Types | Public Member Functions | Static Public Member Functions
Tonido::Data::AuthKey Class Reference

Auth Key that is used by the Authentication System. More...

List of all members.

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.
AuthKeyoperator= (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.

Detailed Description

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


Member Enumeration Documentation

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.


Constructor & Destructor Documentation

Tonido::Data::AuthKey::AuthKey ( )

Ctor.

details if needed ...

Tonido::Data::AuthKey::~AuthKey ( )

Dtor.

details if needed ...


Member Function Documentation

const std::string & Tonido::Data::AuthKey::authContext ( ) const

Returns the associated auth context.

Returns:
the associated auth context
AuthKey::AuthLocation Tonido::Data::AuthKey::authLocation ( ) const

Returns the originating location of the message.

Returns:
the location
std::string Tonido::Data::AuthKey::authLocationAsString ( AuthKey::AuthLocation  a_location) [static]

Returns the location of this message as a string.

Parameters:
[in]a_locationauthentication location
Returns:
the location of this message
AuthKey::AuthLocation Tonido::Data::AuthKey::authLocationFromString ( const std::string &  a_source) [static]

Returns the location from a given string.

Parameters:
[in]a_sourcelocation
Returns:
the location
AuthKey::AuthRole Tonido::Data::AuthKey::authRole ( ) const

Returns the Authentication Role of this message.

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.

Parameters:
[in]a_roleauthentication role
Returns:
the authentication role of this message
AuthKey::AuthRole Tonido::Data::AuthKey::authRoleFromString ( const std::string &  a_role) [static]

Returns the Authentication Role of this message given a string.

Parameters:
[in]a_roleauthentication role
Returns:
the authentication role of this message
AuthKey::AuthSource Tonido::Data::AuthKey::authSource ( ) const

Returns the source of this message.

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.

Returns:
the source of this message
AuthKey::AuthSource Tonido::Data::AuthKey::authSourceFromString ( const std::string &  a_source) [static]

Returns the Authentication Source of this message given a string.

Parameters:
[in]a_sourceauthentication source
Returns:
the source of this message
bool Tonido::Data::AuthKey::isValid ( ) const

Returns whether the given Auth Key is valid.

Returns:
true if auth key is valid, false otherwise

Generated on Wed Oct 12 2011 21:46:53. © CodeLathe LLC 2007-2011. All Rights Reserved.