SASLContext Class Reference

An SASL client context. More...

Inheritance diagram for SASLContext:
Inheritance graph
[legend]
Collaboration diagram for SASLContext:
Collaboration graph
[legend]

List of all members.

Public Member Functions

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

Detailed Description

An SASL client context.


Constructor & Destructor Documentation

~SASLContext (  ) 
SASLContext (  ) 

Construct and initialize a new SASL context.


Member Function Documentation

ref< SASLMechanism > createMechanism ( const string name  ) 

Create an instance of an SASL mechanism.

Parameters:
name mechanism name
Returns:
a new instance of the specified SASL mechanism
Exceptions:
exceptions::no_such_mechanism if no mechanism is registered for the specified name

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

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

Create and initialize a new SASL session.

Parameters:
serviceName name of the service which will use the session
auth authenticator object to use during the session
mech SASL mechanism
Returns:
a new SASL session
void decodeB64 ( const string input,
byte_t **  output,
int *  outputLen 
)

Helper function for decoding Base64-encoded challenge.

Parameters:
input input buffer
output output buffer
outputLen length of output buffer

References encoderFactory::getInstance().

const string encodeB64 ( const byte_t input,
const int  inputLen 
)

Helper function for encoding challenge in Base64.

Parameters:
input input buffer
inputLen length of input buffer
Returns:
Base64-encoded challenge

References encoderFactory::getInstance().

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

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

Parameters:
mechs list of mechanisms
Returns:
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:

Generated by  doxygen 1.6.2