Class WhoAmIExtendedRequest

All Implemented Interfaces:
ExtendedRequest<WhoAmIExtendedResult>, ProtocolOp, Request

public final class WhoAmIExtendedRequest extends AbstractExtendedRequest<WhoAmIExtendedRequest,WhoAmIExtendedResult> implements ExtendedRequest<WhoAmIExtendedResult>
The who am I extended request as defined in RFC 4532. This operation allows clients to obtain the primary authorization identity, in its primary form, that the server has associated with the user or application entity.

The following example demonstrates use of the Who Am I? request and response.

 Connection connection = ...;
 String name = ...;
 char[] password = ...;

 Result result = connection.bind(name, password);
 if (result.isSuccess()) {
     WhoAmIExtendedRequest request = Requests.newWhoAmIExtendedRequest();
     WhoAmIExtendedResult extResult = connection.extendedRequest(request);

     if (extResult.isSuccess()) {
         // Authz ID: "  + extResult.getAuthorizationID());
     }
 }
 
This operation may preferable to the Authorization Identity Controls mechanism defined in RFC 3829, which uses Bind request and response controls to request and return the authorization identity. Bind controls are not protected by security layers established by the Bind operation that includes them. While it is possible to establish security layers using StartTLS prior to the Bind operation, it is often desirable to use security layers established by the Bind operation. An extended operation sent after a Bind operation is protected by the security layers established by the Bind operation.
See Also: