Execution context passed to functions for referencing resources and to define authorization dependend processing. More...
#include <execContext.hpp>
Public Types | |
enum | BasicAuthorizationFunction { CONNECT, PASSWD } |
Hardcoded basic authorization function enumeration. More... | |
Public Member Functions | |
ExecContext () | |
Default Constructor. More... | |
ExecContext (const ProcessorProviderInterface *p, const AAAA::AAAAproviderInterface *a) | |
Constructor. More... | |
const ProcessorProviderInterface * | provider () const |
Get the processor provider interface. More... | |
const AAAA::User * | user () const |
Get the the user instance reference. More... | |
void | setUser (AAAA::User *u) |
Set the user instance. More... | |
const AAAA::Authorizer * | authorizer () const |
Get the authorization instance interface. More... | |
void | setAuthorizer (const AAAA::Authorizer *a) |
Set the authorization instance interface. More... | |
unsigned int | defaultTimeout () const |
Get the default timeout for read operations in seconds. More... | |
void | setDefaultTimeout (unsigned int timeout_sec_) |
Set the default timeout for read operations in seconds (0=forever) More... | |
const char * | socketIdentifier () const |
Get the socket identifier for authorization checks. More... | |
const net::RemoteEndpoint * | remoteEndpoint () const |
Get the remote endpoint for authorization checks. More... | |
const net::LocalEndpoint * | localEndpoint () const |
Get the local endpoint for authorization checks. More... | |
void | setConnectionData (const net::RemoteEndpointR &remoteEndpoint_, const net::LocalEndpointR &localEndpoint_) |
Set the socket identifier for authorization checks. More... | |
bool | hasCapability (const std::string &c) const |
Ask for a capability for this execution context. More... | |
AAAA::Authenticator * | authenticator (const net::RemoteEndpoint &client) const |
Get an authenticator. More... | |
AAAA::PasswordChanger * | passwordChanger (const net::RemoteEndpoint &client) const |
Get a password changer. More... | |
bool | checkAuthorization (const std::string &funcname, const std::string &resource, std::string &errmsg, bool allowIfNotExists=false) |
Checks if a function tagged with AUTHORIZE( funcname, resource) is allowed to be executed. More... | |
bool | checkAuthorization (BasicAuthorizationFunction f) |
Checks authorization for a basic function. More... | |
db::Transaction * | transaction (const std::string &name) |
Create a new transaction object. More... | |
void | push_database (const std::string &dbname) |
Declare the database 'dbname' as the current transaction database. More... | |
void | pop_database () |
Restore the previous current transaction database. More... | |
Static Public Member Functions | |
static const char * | basicAuthorizationFunctionName (BasicAuthorizationFunction n) |
Get the name of a basic function. More... | |
Private Member Functions | |
ExecContext (const ExecContext &) | |
void | operator= (const ExecContext &) |
Private Attributes | |
const ProcessorProviderInterface * | m_provider |
processor provider interface More... | |
types::SecureReference < AAAA::User > | m_user |
user instance More... | |
const AAAA::Authorizer * | m_authorizer |
instance to query for execution permission based on login data More... | |
const AAAA::AAAAproviderInterface * | m_aaaaProvider |
instance to query for an authenticator More... | |
unsigned int | m_default_timeout |
default timeout More... | |
net::RemoteEndpointR | m_remoteEndpoint |
remote end point of the connection More... | |
net::LocalEndpointR | m_localEndpoint |
local end point of the connection More... | |
std::vector< std::string > | m_dbstack |
stack for implementing current database as scope More... | |
Execution context passed to functions for referencing resources and to define authorization dependend processing.
|
inline |
Default Constructor.
|
inline |
Constructor.
|
private |
|
inline |
Get an authenticator.
|
inline |
Get the authorization instance interface.
|
inlinestatic |
Get the name of a basic function.
bool _Wolframe::proc::ExecContext::checkAuthorization | ( | const std::string & | funcname, |
const std::string & | resource, | ||
std::string & | errmsg, | ||
bool | allowIfNotExists = false |
||
) |
Checks if a function tagged with AUTHORIZE( funcname, resource) is allowed to be executed.
|
inline |
Checks authorization for a basic function.
|
inline |
Get the default timeout for read operations in seconds.
|
inline |
Ask for a capability for this execution context.
|
inline |
Get the local endpoint for authorization checks.
|
private |
|
inline |
Get a password changer.
|
inline |
Restore the previous current transaction database.
|
inline |
Get the processor provider interface.
|
inline |
Declare the database 'dbname' as the current transaction database.
|
inline |
Get the remote endpoint for authorization checks.
|
inline |
Set the authorization instance interface.
|
inline |
Set the socket identifier for authorization checks.
|
inline |
Set the default timeout for read operations in seconds (0=forever)
|
inline |
Set the user instance.
|
inline |
Get the socket identifier for authorization checks.
db::Transaction* _Wolframe::proc::ExecContext::transaction | ( | const std::string & | name | ) |
Create a new transaction object.
|
inline |
Get the the user instance reference.
|
private |
instance to query for an authenticator
|
private |
instance to query for execution permission based on login data
|
private |
stack for implementing current database as scope
|
private |
default timeout
|
private |
local end point of the connection
|
private |
processor provider interface
|
private |
remote end point of the connection
|
private |
user instance
Copyright © 2014 - Project Wolframe - All Rights Reserved