Skip to main content

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

Public Types

enum AUTH_CTX_TYPE

Authentication context type.

ValueDescription
UserAndPasswordERUCES Native user and password authentication context (using SRP).
WindowsKerberos (Windows) authentication context.
CodeAccessCode access authentication context (for trusted component).
UserAndPassword_V1Deprecated
LDAPLDAP authentication context.
TOKENToken authentication context.
X509The X.509 authentication context. For PKCS -11,12 authentication see SSLMutualConnection.
NISUnix/Nis user authentication context.

enum AUTH_CTX_MODE

Authentication mode - for client engine only.

ValueDescription
ON_LINEon-line mode: client engine acts as a proxy for authentication
OFF_LINEoff-line mode: client engine performs authentication

Protected Attributes

TypeNameDescription
TEConnection *m_pConn
te_oidm_nID
uint32_tm_nMode
_TESTD string *m_pstrServer
AUTH_CTX_TYPEm_nType
_TESTD string *m_pstrCookie

Protected Member Functions

MemberDescription
TEAuthenticationContext()The TEAuthenticationContext constructor is the default class constructor.
TEAuthenticationContext(const TEAuthenticationContext &)The TEAuthenticationContext constructor copies a TEAuthenticationContext object.

Public Member Functions

MemberDescription
~TEAuthenticationContext()The TEAuthenticationContext destructor is the class destructor.
te_oid authenticate()=0The authenticate method authenticates a principal.
AUTH_CTX_TYPE getContextType() constThe getContextType method gets the type of authentication in use.
uint32_t getMode() constThe getMode method gets the local authentication mode.
void setMode(const uint32_t mode)The setMode method sets the local authentication mode.
_TESTD string getRemoteServer() constThe 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) constThe 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

ParameterDescription
modeAn 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

ParameterDescription
serverA 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

ParameterDescription
pConnA pointer to an existing TEConnection object.

void detachConnection()

The detachConnection method detaches a connection.