Package org.apache.juddi.v3.auth

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


   * configuration.
   */
  public void registerAnnotatedServices() {
    Map<String,UDDIClerk> uddiClerks = clientConfig.getUDDIClerks();
    if (uddiClerks.size() > 0) {
      AnnotationProcessor ap = new AnnotationProcessor();
      for (UDDIClerk uddiClerk : uddiClerks.values()) {
        Collection<BusinessService> services = ap.readServiceAnnotations(
            uddiClerk.getClassWithAnnotations(),uddiClerk.getUDDINode().getProperties());
        for (BusinessService businessService : services) {
          log.info("Node=" + uddiClerk.getUDDINode().getApiNode().getName());
          uddiClerk.register(businessService, uddiClerk.getUDDINode().getApiNode());
        }
View Full Code Here


   * @throws RemoteException
   */
  public void unRegisterAnnotatedServices() {
    Map<String,UDDIClerk> clerks = clientConfig.getUDDIClerks();
    if (clerks.size() > 0) {
      AnnotationProcessor ap = new AnnotationProcessor();
      for (UDDIClerk clerk : clerks.values()) {
        Collection<BusinessService> services = ap.readServiceAnnotations(
            clerk.getClassWithAnnotations(),clerk.getUDDINode().getProperties());
        for (BusinessService businessService : services) {
          clerk.unRegisterService(businessService.getServiceKey(),clerk.getUDDINode().getApiNode());
        }
      }
View Full Code Here

   */
  public void unRegisterBindingsOfAnnotatedServices(boolean removeServiceWithNoBindingTemplates) {
   
      Map<String,UDDIClerk> clerks = clientConfig.getUDDIClerks();
      if (clerks.size() > 0) {
        AnnotationProcessor ap = new AnnotationProcessor();
        for (UDDIClerk clerk : clerks.values()) {
          Collection<BusinessService> services = ap.readServiceAnnotations(
              clerk.getClassWithAnnotations(),clerk.getUDDINode().getProperties());
          for (BusinessService businessService : services) {
            if (businessService.getBindingTemplates() != null) {
              List<BindingTemplate> bindingTemplates = businessService.getBindingTemplates().getBindingTemplate();
              for (BindingTemplate bindingTemplate : bindingTemplates) {
View Full Code Here

   * @throws ConfigurationException
   */
  @Test
  public void 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()
  {
    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

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

   */
  @Test
  public void 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

   * @throws JAXBException
   */
  @Test(expected=UnknownUserException.class)
  public void testBadCryptedXMLDocAuthenticator() throws Exception
  {
    Authenticator auth = new CryptedXMLDocAuthenticator();
    auth.authenticate("anou_mana","badpass");
  }
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

      throw new AuthTokenRequiredException(new ErrorMessage("errors.auth.AuthInvalid"));
   
    if (modelAuthToken.getTokenState() == AUTHTOKEN_RETIRED)
      throw new AuthTokenRequiredException(new ErrorMessage("errors.auth.AuthInvalid"));
   
    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

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.