Class LdapRelay.

Inherits Connection

The LdapRelay class helps Mechanism relay SASL challenges and responses to and from an LDAP server. If the LDAP server accepts the authentication, then the user is accepted as an Archiveopteryx user.

The LdapRelay state machine contains the following states:

Working: The LDAP server still hasn't answered.

BindFailed: We should reject this authentication.

BindSucceeded: We should accept this authentication.

The implementation is based on RFC 4511.

LdapRelay::LdapRelay( SaslMechanism * mechanism )

Constructs an LdapRelay to verify whatever mechanism needs.

void LdapRelay::bind()

Sends a single bind request.

void LdapRelay::fail( const EString & error )

This private helper sets the state and logs error.

void LdapRelay::parse()

Parses the response the server sends, which has to be a bind response.

void LdapRelay::react( Event e )

Reacts to incoming packets from the LDAP server, changes the object's state, and eventually notifies the Mechanism. e is as for Connection::react().

Reimplements Connection::react().

static Endpoint LdapRelay::server()

Returns the address of the LDAP server used.

State LdapRelay::state() const

Returns the relay object's current state.

Reimplements Connection::state().

void LdapRelay::succeed()

This private helper sets the state and logs.

void LdapRelay::unbind()

Sends an unbind request.

This web page based on source code belonging to The Archiveopteryx Developers. All rights reserved.