Package org.nasutekds.server.protocols.ldap

Examples of org.nasutekds.server.protocols.ldap.ExtendedRequestProtocolOp


        // TODO: Better message
        err.println(e);
      }


      ExtendedRequestProtocolOp extendedRequest =
           new ExtendedRequestProtocolOp(OID_PASSWORD_POLICY_STATE_EXTOP,
                                         builder.toByteString());

      LDAPMessage requestMessage =
           new LDAPMessage(nextMessageID.getAndIncrement(), extendedRequest);
View Full Code Here


            ByteString requestValue =
                 GetSymmetricKeyExtendedOperation.encodeRequestValue(
                      symmetricKey, getInstanceKeyID());

            ExtendedRequestProtocolOp extendedRequest =
                 new ExtendedRequestProtocolOp(
                      ServerConstants.
                           OID_GET_SYMMETRIC_KEY_EXTENDED_OP,
                      requestValue);

            ArrayList<Control> controls =
View Full Code Here

    String requestName = extendedRequest.getRequestName();
    Object value = extendedRequest.getRequestValue();
    ByteString asnValue = ByteString.valueOf(value.toString());

    // Create and send the LDAP request to the server.
    ProtocolOp op = new ExtendedRequestProtocolOp(requestName, asnValue);
    LDAPMessage msg = new LDAPMessage(DSMLServlet.nextMessageID(), op);
    connection.getLDAPWriter().writeMessage(msg);

    // Read and decode the LDAP response from the server.
    LDAPMessage responseMessage = connection.getLDAPReader().readMessage();
View Full Code Here

   */
  public ByteString requestAuthorizationIdentity()
         throws ClientException, LDAPException
  {
    // Construct the extended request and send it to the server.
    ExtendedRequestProtocolOp extendedRequest =
         new ExtendedRequestProtocolOp(OID_WHO_AM_I_REQUEST);
    LDAPMessage requestMessage =
         new LDAPMessage(nextMessageID.getAndIncrement(), extendedRequest);

    try
    {
View Full Code Here

        }
        throw new LDAPConnectionException(Message.raw(ex.getMessage()), ex);
      }

      // Send the StartTLS extended request.
      ExtendedRequestProtocolOp extendedRequest =
           new ExtendedRequestProtocolOp(OID_START_TLS_REQUEST);

      LDAPMessage msg = new LDAPMessage(nextMessageID.getAndIncrement(),
                                        extendedRequest);
      try
      {
View Full Code Here

    catch(Exception e)
    {
      err.println(e);
    }

    ExtendedRequestProtocolOp extendedRequest =
         new ExtendedRequestProtocolOp(OID_PASSWORD_MODIFY_REQUEST,
                                       builder.toByteString());
    LDAPMessage requestMessage =
         new LDAPMessage(nextMessageID.getAndIncrement(), extendedRequest,
                         controls);
View Full Code Here


    // Create a "Who Am I?" extended operation and send it to the server.  Make
    // sure to include the delay request control so it won't complete before we
    // can send the abandon request.
    ExtendedRequestProtocolOp whoAmIRequest =
         new ExtendedRequestProtocolOp(OID_WHO_AM_I_REQUEST, null);
    message = new LDAPMessage(2, whoAmIRequest,
                       DelayPreOpPlugin.createDelayControlList(5000));
    w.writeMessage(message);

View Full Code Here

    assertNotNull(authzID);
    assertEquals(authzID.toString(), "dn:uid=proxy.user,o=test");


    // Use the "Who Am I?" operation again, this time with the proxy control.
    ExtendedRequestProtocolOp extendedRequest =
         new ExtendedRequestProtocolOp(OID_WHO_AM_I_REQUEST);
    ArrayList<Control> requestControls = new ArrayList<Control>(1);
    requestControls.add(new ProxiedAuthV2Control(
         ByteString.valueOf("dn:uid=test.user,o=test")));
    LDAPMessage message = new LDAPMessage(nextMessageID.getAndIncrement(),
                                          extendedRequest, requestControls);
View Full Code Here

    assertNotNull(authzID);
    assertEquals(authzID.toString(), "dn:uid=cantproxy.user,o=test");


    // Use the "Who Am I?" operation again, this time with the proxy control.
    ExtendedRequestProtocolOp extendedRequest =
         new ExtendedRequestProtocolOp(OID_WHO_AM_I_REQUEST);
    ArrayList<Control> requestControls = new ArrayList<Control>(1);
    requestControls.add(new ProxiedAuthV2Control(
         ByteString.valueOf("dn:uid=test.user,o=test")));
    LDAPMessage message = new LDAPMessage(nextMessageID.getAndIncrement(),
                                          extendedRequest, requestControls);
View Full Code Here

    ByteStringBuilder builder = new ByteStringBuilder();
    ASN1Writer writer = ASN1.getWriter(builder);
    writer.writeStartSequence();
    writer.writeInteger(2);
    writer.writeEndSequence();
    ExtendedRequestProtocolOp extendedRequest =
         new ExtendedRequestProtocolOp(OID_CANCEL_REQUEST,
             builder.toByteString());
    message = new LDAPMessage(3, extendedRequest);
    w.writeMessage(message);

View Full Code Here

TOP

Related Classes of org.nasutekds.server.protocols.ldap.ExtendedRequestProtocolOp

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.