ERUCES::TEAuthenticationContext
#include <teauthctx.h>
The TEAuthenticationContext class is an abstract class representing the authentication context in use.
This class is the base class for the TEUserAuthenticationContext and TEWinAuthenticationContext classes.
Inheritance
- Inherits ERUCES::TEObject
- Inherited by ERUCES::TECodeAuthenticationContext
- Inherited by ERUCES::TECookieAuthenticationContext
- Inherited by ERUCES::TELdapAuthenticationContext
- Inherited by ERUCES::TENisAuthenticationContext
- Inherited by ERUCES::TESSLMutualAuthenticationContext
- Inherited by ERUCES::TEUserAuthenticationContext
- Inherited by ERUCES::TEWinAuthenticationContext
- Inherited by ERUCES::TEX509AuthenticationContext
Public Types
enum AUTH_CTX_TYPE
Authentication context type.
| Value | Description |
|---|---|
UserAndPassword | ERUCES Native user and password authentication context (using SRP). |
Windows | Kerberos (Windows) authentication context. |
CodeAccess | Code access authentication context (for trusted component). |
UserAndPassword_V1 | Deprecated |
LDAP | LDAP authentication context. |
TOKEN | Token authentication context. |
X509 | The X.509 authentication context. For PKCS -11,12 authentication see SSLMutualConnection. |
NIS | Unix/Nis user authentication context. |
enum AUTH_CTX_MODE
Authentication mode - for client engine only.
| Value | Description |
|---|---|
ON_LINE | on-line mode: client engine acts as a proxy for authentication |
OFF_LINE | off-line mode: client engine performs authentication |
Protected Attributes
| Type | Name | Description |
|---|---|---|
| TEConnection * | m_pConn | |
| te_oid | m_nID | |
| uint32_t | m_nMode | |
| _TESTD string * | m_pstrServer | |
| AUTH_CTX_TYPE | m_nType | |
| _TESTD string * | m_pstrCookie |
Protected Member Functions
| Member | Description |
|---|---|
TEAuthenticationContext() | The TEAuthenticationContext constructor is the default class constructor. |
TEAuthenticationContext(const TEAuthenticationContext &) | The TEAuthenticationContext constructor copies a TEAuthenticationContext object. |
Public Member Functions
| Member | Description |
|---|---|
~TEAuthenticationContext() | The TEAuthenticationContext destructor is the class destructor. |
te_oid authenticate()=0 | The authenticate method authenticates a principal. |
AUTH_CTX_TYPE getContextType() const | The getContextType method gets the type of authentication in use. |
uint32_t getMode() const | The getMode method gets the local authentication mode. |
void setMode(const uint32_t mode) | The setMode method sets the local authentication mode. |
_TESTD string getRemoteServer() const | The getRemoteServer method gets the name of a remote server. |
void setRemoteServer(const _TESTD string &server) | The setRemoteServer method sets the name of a remote server. |
const _TESTD string getToken(bool encode=true) const | The getToken method returns a token. |
void attachConnection(TEConnection *pConn) | The attachConnection method attaches to a connection specified by a TEConnection pointer. |
void detachConnection() | The detachConnection method detaches a connection. |
Member Function Documentation
TEAuthenticationContext()
The TEAuthenticationContext constructor is the default class constructor.
TEAuthenticationContext(const TEAuthenticationContext &)
The TEAuthenticationContext constructor copies a TEAuthenticationContext object.
~TEAuthenticationContext()
The TEAuthenticationContext destructor is the class destructor.
te_oid authenticate()=0
The authenticate method authenticates a principal.
Returns: Returns a long integer representing the Principal ID of the principal.
AUTH_CTX_TYPE getContextType() const
The getContextType method gets the type of authentication in use.
Returns: Returns an integer representing the authentication type: TEAuthenticationContext::UserAndPassword = ERUCES Native username and password-based authentication; TEAuthenticationContext::CodeAccess = code-based authentication; TEAuthenticationContext::Windows = Kerberos (Windows) based authentication; TEAuthenticationContext::LDAP = LDAP based authentication. TEAuthenticationContext::TOKEN = Token based authentication.
uint32_t getMode() const
The getMode method gets the local authentication mode.
Returns: Returns an integer representing the local authentication mode; TEAuthenticationContext::ON_LINE = online mode; TEAuthenticationContext::OFF_LINE = offline mode.
void setMode(const uint32_t mode)
The setMode method sets the local authentication mode.
Parameters
| Parameter | Description |
|---|---|
mode | An integer representing the local authentication mode to be set; TEAuthenticationContext::ON_LINE = online mode TEAuthenticationContext::OFF_LINE = offline mode. |
_TESTD string getRemoteServer() const
The getRemoteServer method gets the name of a remote server.
Returns: Returns a string representing the name of a remote server.
void setRemoteServer(const _TESTD string &server)
The setRemoteServer method sets the name of a remote server.
Parameters
| Parameter | Description |
|---|---|
server | A string representing the name of a remote server. |
const _TESTD string getToken(bool encode=true) const
The getToken method returns a token.
Returns: String of token. (Token is in binary array format)
void attachConnection(TEConnection *pConn)
The attachConnection method attaches to a connection specified by a TEConnection pointer.
Parameters
| Parameter | Description |
|---|---|
pConn | A pointer to an existing TEConnection object. |
void detachConnection()
The detachConnection method detaches a connection.