Package com.sonatype.security.ldap.api.dto

Examples of com.sonatype.security.ldap.api.dto.LdapAuthenticationTestRequest


  public void testSuccess()
      throws Exception
  {
    PlexusResource pr = this.lookup(PlexusResource.class, "LdapTestAuthenticationPlexusResource");

    LdapAuthenticationTestRequest authTestRequest = new LdapAuthenticationTestRequest();
    LdapConnectionInfoDTO dto = new LdapConnectionInfoDTO();
    authTestRequest.setData(dto);

    dto.setAuthScheme("simple");
    dto.setHost("localhost");
    dto.setPort(this.getLdapServer("default").getPort());
    dto.setProtocol("ldap");
View Full Code Here


  public void testFailure()
      throws Exception
  {
    PlexusResource pr = this.lookup(PlexusResource.class, "LdapTestAuthenticationPlexusResource");

    LdapAuthenticationTestRequest authTestRequest = new LdapAuthenticationTestRequest();
    LdapConnectionInfoDTO dto = new LdapConnectionInfoDTO();
    authTestRequest.setData(dto);

    dto.setAuthScheme("simple");
    dto.setHost("invalidHost");
    dto.setPort(this.getLdapServer("default").getPort());
    dto.setProtocol("ldap");
View Full Code Here

    this.setModifiable(true);
  }

  @Override
  public Object getPayloadInstance() {
    return new LdapAuthenticationTestRequest();
  }
View Full Code Here

  protected Object doPut(Context context, Request request, Response response, Object payload)
      throws ResourceException,
             InvalidConfigurationException
  {

    LdapAuthenticationTestRequest authRequest = (LdapAuthenticationTestRequest) payload;

    CConnectionInfo connectionInfo = this.toLdapModel(authRequest.getData());
    String ldapServerId = null;
    if (request.getResourceRef() != null) {
      ldapServerId = request.getResourceRef().getQueryAsForm().getFirstValue("ldapServerId");
    }
    replaceFakePassword(connectionInfo, ldapServerId, ldapConfigurationManager);
View Full Code Here

  }

  private void testConnection(final LdapServerConfigurationDTO ldapServer, final boolean sendServerId)
      throws Exception
  {
    final LdapAuthenticationTestRequest resourceRequest = new LdapAuthenticationTestRequest();
    resourceRequest.setData(ldapServer.getConnectionInfo());

    XStream xstream = this.getXMLXStream();
    Response response = null;
    try {
      response = RequestFacade.sendMessage(
View Full Code Here

TOP

Related Classes of com.sonatype.security.ldap.api.dto.LdapAuthenticationTestRequest

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.