Examples of Authenticate


Examples of org.apache.cxf.authservice.Authenticate

        assertEquals(2, roles.length);
        assertEquals("Joe", roles[0]);
        assertEquals("Joe-1", roles[1]);
       
        assertEquals("get Joe", service.getAuthentication("Joe"));
        Authenticate au = new Authenticate();
        au.setSid("ffang");
        au.setUid("ffang");
        assertTrue(service.authenticate(au));
        au.setUid("ffang1");
        assertFalse(service.authenticate(au));
    }
View Full Code Here

Examples of org.apache.cxf.authservice.Authenticate

       
        roles = service.getRolesAsArray("0");
        assertEquals(0, roles.length);
       
        assertEquals("get Joe", service.getAuthentication("Joe"));
        Authenticate au = new Authenticate();
        au.setSid("ffang");
        au.setUid("ffang");
        assertTrue(service.authenticate(au));
        au.setUid("ffang1");
        assertFalse(service.authenticate(au));
    }
View Full Code Here

Examples of org.cipango.sip.security.Authenticate

  {
    List<String> list = new ArrayList<String>();
    ListIterator<String > it = _fields.getValues(SipHeaders.WWW_AUTHENTICATE_BUFFER);
    while (it.hasNext())
    {
      Authenticate authenticate = new Authenticate(it.next());
      list.add(authenticate.getParameter(Authenticate.REALM_BUFFER));
    }
    it = _fields.getValues(SipHeaders.PROXY_AUTHENTICATE_BUFFER);
    while (it.hasNext())
    {
      Authenticate authenticate = new Authenticate(it.next());
      list.add(authenticate.getParameter(Authenticate.REALM_BUFFER));
    }
    return list.iterator();
  }
View Full Code Here

Examples of org.cipango.sip.security.Authenticate

  public void addAuthHeader(SipServletResponse challengeResponse, AuthInfo authInfo)
  {
    ListIterator<String> authenticates = challengeResponse.getHeaders(SipHeaders.WWW_AUTHENTICATE);
    while (authenticates.hasNext())
    {
      Authenticate authenticate = new Authenticate(authenticates.next());
      AuthElement element = ((AuthInfoImpl) authInfo).getAuthElement(challengeResponse.getStatus(), authenticate.getRealm());
      Authorization authorization =
        new Authorization(authenticate, element.getUsername(), element.getPassword(), getRequestURIAsString(), getMethod());
      addHeader(SipHeaders.AUTHORIZATION, authorization.toString());
    }
    authenticates = challengeResponse.getHeaders(SipHeaders.PROXY_AUTHENTICATE);
    while (authenticates.hasNext())
    {
      Authenticate authenticate = new Authenticate(authenticates.next());
      AuthElement element = ((AuthInfoImpl) authInfo).getAuthElement(challengeResponse.getStatus(), authenticate.getRealm());
      Authorization authorization =
        new Authorization(authenticate, element.getUsername(), element.getPassword(), getRequestURIAsString(), getMethod());
      addHeader(SipHeaders.PROXY_AUTHORIZATION, authorization.toString());
    }
  }
View Full Code Here

Examples of org.cipango.sip.security.Authenticate

  public void addAuthHeader(SipServletResponse challengeResponse, String username, String password)
  {
    ListIterator<String> authenticates = challengeResponse.getHeaders(SipHeaders.WWW_AUTHENTICATE);
    while (authenticates.hasNext())
    {
      Authenticate authenticate = new Authenticate(authenticates.next());
      Authorization authorization =
        new Authorization(authenticate, username, password, getRequestURIAsString(), getMethod());
      addHeader(SipHeaders.AUTHORIZATION, authorization.toString());
    }
    authenticates = challengeResponse.getHeaders(SipHeaders.PROXY_AUTHENTICATE);
    while (authenticates.hasNext())
    {
      Authenticate authenticate = new Authenticate(authenticates.next());
      Authorization authorization =
        new Authorization(authenticate, username, password, getRequestURIAsString(), getMethod());
      addHeader(SipHeaders.PROXY_AUTHORIZATION, authorization.toString());
    }
  }
View Full Code Here

Examples of org.jboss.ws.metadata.wsse.Authenticate

   {
      SecurityStore securityStore = new SecurityStore(configuration.getKeyStoreURL(), configuration.getKeyStoreType(), configuration.getKeyStorePassword(),
            configuration.getKeyPasswords(), configuration.getTrustStoreURL(), configuration.getTrustStoreType(), configuration.getTrustStorePassword());
      NonceFactory factory = Util.loadFactory(NonceFactory.class, configuration.getNonceFactory(), DefaultNonceFactory.class);
     
      Authenticate authenticate = null;

      if (operationConfig != null)
      {
         authenticate = operationConfig.getAuthenticate();
      }
View Full Code Here

Examples of org.jboss.ws.metadata.wsse.Authenticate

   private void decodeHeader(WSSecurityConfiguration configuration, Config config, SOAPMessage message, Element secHeaderElement, boolean fault) throws WSSecurityException
   {
      SecurityStore securityStore = new SecurityStore(configuration);
      NonceFactory factory = Util.loadFactory(NonceFactory.class, configuration.getNonceFactory(), DefaultNonceFactory.class);

      Authenticate authenticate = null;

      if (config != null)
      {
         authenticate = config.getAuthenticate();
      }
View Full Code Here

Examples of org.jboss.ws.metadata.wsse.Authenticate

   {
      SecurityStore securityStore = new SecurityStore(configuration.getKeyStoreURL(), configuration.getKeyStoreType(), configuration.getKeyStorePassword(),
            configuration.getKeyPasswords(), configuration.getTrustStoreURL(), configuration.getTrustStoreType(), configuration.getTrustStorePassword());
      NonceFactory factory = Util.loadFactory(NonceFactory.class, configuration.getNonceFactory(), DefaultNonceFactory.class);

      Authenticate authenticate = null;

      if (config != null)
      {
         authenticate = config.getAuthenticate();
      }
View Full Code Here

Examples of org.jboss.ws.metadata.wsse.Authenticate

   {
      SecurityStore securityStore = new SecurityStore(configuration.getKeyStoreURL(), configuration.getKeyStoreType(), configuration.getKeyStorePassword(),
            configuration.getKeyPasswords(), configuration.getTrustStoreURL(), configuration.getTrustStoreType(), configuration.getTrustStorePassword());
      NonceFactory factory = Util.loadFactory(NonceFactory.class, configuration.getNonceFactory(), DefaultNonceFactory.class);

      Authenticate authenticate = null;

      if (config != null)
      {
         authenticate = config.getAuthenticate();
      }
View Full Code Here

Examples of org.jboss.ws.metadata.wsse.Authenticate

   private void decodeHeader(WSSecurityConfiguration configuration, Config config, SOAPMessage message, Element secHeaderElement, boolean fault) throws WSSecurityException
   {
      SecurityStore securityStore = new SecurityStore(configuration);
      NonceFactory factory = Util.loadFactory(NonceFactory.class, configuration.getNonceFactory(), DefaultNonceFactory.class);

      Authenticate authenticate = null;

      if (config != null)
      {
         authenticate = config.getAuthenticate();
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.