SASLContext Class Reference
Inheritance diagram for SASLContext:
Collaboration diagram for SASLContext:

Public Member Functions

 ~SASLContext ()
 SASLContext ()
shared_ptr< SASLSessioncreateSession (const string &serviceName, shared_ptr< authenticator > auth, shared_ptr< SASLMechanism > mech)
shared_ptr< SASLMechanismcreateMechanism (const string &name)
shared_ptr< SASLMechanismsuggestMechanism (const std::vector< shared_ptr< SASLMechanism > > &mechs)
void decodeB64 (const string &input, byte_t **output, size_t *outputLen)
const string encodeB64 (const byte_t *input, const size_t inputLen)

Additional Inherited Members

- Protected Member Functions inherited from object
 object ()
 object (const object &)
objectoperator= (const object &)
virtual ~object ()

Detailed Description

An SASL client context.

Constructor & Destructor Documentation

Construct and initialize a new SASL context.

Member Function Documentation

shared_ptr< SASLMechanism > createMechanism ( const string name)

Create an instance of an SASL mechanism.

namemechanism name
a new instance of the specified SASL mechanism
exceptions::no_such_mechanismif no mechanism is registered for the specified name

References SASLMechanismFactory::create(), and SASLMechanismFactory::getInstance().

shared_ptr< SASLSession > createSession ( const string serviceName,
shared_ptr< authenticator auth,
shared_ptr< SASLMechanism mech 

Create and initialize a new SASL session.

serviceNamename of the service which will use the session
authauthenticator object to use during the session
mechSASL mechanism
a new SASL session
void decodeB64 ( const string input,
byte_t **  output,
size_t outputLen 

Helper function for decoding Base64-encoded challenge.

inputinput buffer
outputoutput buffer
outputLenlength of output buffer

References encoderFactory::getInstance().

const string encodeB64 ( const byte_t input,
const size_t  inputLen 

Helper function for encoding challenge in Base64.

inputinput buffer
inputLenlength of input buffer
Base64-encoded challenge

References encoderFactory::getInstance().

shared_ptr< SASLMechanism > suggestMechanism ( const std::vector< shared_ptr< SASLMechanism > > &  mechs)

Suggests an SASL mechanism among a set of mechanisms supported by the server.

mechslist of mechanisms
suggested mechanism (usually the safest mechanism supported by both the client and the server)

The documentation for this class was generated from the following files: