Package org.apache.juddi.v3.auth

Examples of org.apache.juddi.v3.auth.Authenticator


  public AuthToken getAuthToken(GetAuthToken body)
      throws DispositionReportFaultMessage {
           
                logger.info("AUDIT: AuthToken request for " + body.getUserID() + " from " + getRequestorsIPAddress());
    Authenticator authenticator = AuthenticatorFactory.getAuthenticator();
   
    String publisherId = authenticator.authenticate(body.getUserID(), body.getCred());
   
    return getAuthToken(publisherId);
  }
View Full Code Here


                            throw (AuthTokenRequiredException)ex;
                        logger.error("unexpected error caught looking up requestor's ip address", ex);
                    }
                   
                }
    Authenticator authenticator = AuthenticatorFactory.getAuthenticator();
    UddiEntityPublisher entityPublisher = authenticator.identify(authInfo, modelAuthToken.getAuthorizedName());
   
    // Must make sure the returned publisher has all the necessary fields filled
    if (entityPublisher == null) {
                    logger.warn("AUDIT FAILURE - Auth token invalided, publisher does not exist "+ getRequestorsIPAddress());
      throw new AuthTokenRequiredException(new ErrorMessage("errors.auth.AuthInvalid"));
View Full Code Here

    }

    if (modelAuthToken.getTokenState() == AUTHTOKEN_RETIRED)
      throw new AuthTokenExpiredException(new ErrorMessage("errors.auth.AuthTokenExpired"));
   
    Authenticator authenticator = AuthenticatorFactory.getAuthenticator();
    UddiEntityPublisher entityPublisher = authenticator.identify(authInfo, modelAuthToken.getAuthorizedName());
   
    // Must make sure the returned publisher has all the necessary fields filled
    if (entityPublisher == null)
      throw new AuthTokenRequiredException(new ErrorMessage("errors.auth.AuthInvalid"));
View Full Code Here

  }


  public AuthToken getAuthToken(GetAuthToken body)
      throws DispositionReportFaultMessage {
    Authenticator authenticator = AuthenticatorFactory.getAuthenticator();
   
    String publisherId = authenticator.authenticate(body.getUserID(), body.getCred());
   
    return getAuthToken(publisherId);
  }
View Full Code Here

   */
  @Test
  public void testDefaultAuthenticator()
  {
            System.out.println("testDefaultAuthenticator");
    Authenticator auth = new JUDDIAuthenticator();
    try {
      API_010_PublisherTest api010 = new API_010_PublisherTest();
      api010.saveJoePublisher();
      api010.saveSamSyndicator();

      auth.authenticate("joepublisher","password");
      auth.authenticate("ssyndicator","badpass");
     
    } catch (Exception e) {
      logger.error(e.getMessage(),e);
      Assert.fail("unexpected");
    }
View Full Code Here

  @Test
  public void testXMLDocAuthenticator()
  {
            System.out.println("testXMLDocAuthenticator");
    try {
      Authenticator auth = new XMLDocAuthenticator();
      auth.authenticate("anou_mana","password");
      auth.authenticate("bozo","clown");
      auth.authenticate("sviens","password");
    } catch (Exception e) {
      logger.error(e.getMessage(),e);
      Assert.fail("unexpected");
    }
  }
View Full Code Here

   */
  @Test(expected=UnknownUserException.class)
  public void testBadXMLDocAuthenticator() throws Exception
  {
            System.out.println("testBadXMLDocAuthenticator");
    Authenticator auth = new XMLDocAuthenticator();
    auth.authenticate("anou_mana","badpass");
  }
View Full Code Here

  @Test
  public void testCryptedXMLDocAuthenticator()
  {
            System.out.println("testCryptedXMLDocAuthenticator");
    try {
      Authenticator auth = new CryptedXMLDocAuthenticator();
      auth.authenticate("anou_mana","password");
      auth.authenticate("bozo","clown");
      auth.authenticate("sviens","password");
    } catch (Exception e) {
      logger.error(e.getMessage(),e);
      Assert.fail("unexpected");
    }
  }
View Full Code Here

  @Test(expected=UnknownUserException.class)
  public void testBadCryptedXMLDocAuthenticator() throws Exception
               
  {
            System.out.println("testBadCryptedXMLDocAuthenticator");
     Authenticator auth = new CryptedXMLDocAuthenticator();
    auth.authenticate("anou_mana","badpass");
  }
View Full Code Here

        @Test
  public void testMD5XMLDocAuthenticator()
  {
            System.out.println("testMD5XMLDocAuthenticator");
    try {
      Authenticator auth = new MD5XMLDocAuthenticator();
      auth.authenticate("anou_mana","password");
      auth.authenticate("bozo","clown");
      auth.authenticate("sviens","password");
    } catch (Exception e) {
      logger.error(e.getMessage(),e);
      Assert.fail("unexpected");
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.juddi.v3.auth.Authenticator

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.