Examples of AuthenticationRequest


Examples of org.jboss.soa.esb.services.security.auth.AuthenticationRequest

    public void shouldThrowIsAliasIsNotFound() throws LoginException, KeyStoreException, NoSuchAlgorithmException, CertificateException, IOException
    {
        final Certificate callerCert = getCertificate(keyStorePath, keyAlias);

        // create the authentication request using the callers certificate as the credential
        final AuthenticationRequest authRequest = getAuthenticationRequest(callerCert);

        // create and setup the esb callback handler
        final CertCallbackHandler certCallbackHandler = new CertCallbackHandler();
        certCallbackHandler.setAuthenticationRequest(authRequest);
        certCallbackHandler.setSecurityConfig(getSecurityConfig("bogusAlias"));
View Full Code Here

Examples of org.jboss.soa.esb.services.security.auth.AuthenticationRequest

    @Test (expected = LoginException.class)
    public void shouldThrowIfCertificateIsNull() throws LoginException, KeyStoreException, NoSuchAlgorithmException, CertificateException, IOException
    {
        // create the authentication request using the callers certificate as the credential
        final AuthenticationRequest authRequest = getAuthenticationRequest(null);

        // create and setup the esb callback handler
        final CertCallbackHandler certCallbackHandler = new CertCallbackHandler();
        certCallbackHandler.setAuthenticationRequest(authRequest);
        certCallbackHandler.setSecurityConfig(getSecurityConfig("bogusAlias"));
View Full Code Here

Examples of org.jboss.soa.esb.services.security.auth.AuthenticationRequest

    {
        // using a different certificate
        final Certificate callerCert = getCertificate(keyStorePath, "certtest2");

        // create the authentication request using the callers certificate as the credential
        final AuthenticationRequest authRequest = getAuthenticationRequest(callerCert);

        // create and setup the esb callback handler
        final CertCallbackHandler certCallbackHandler = new CertCallbackHandler();
        certCallbackHandler.setAuthenticationRequest(authRequest);
        certCallbackHandler.setSecurityConfig(getSecurityConfig(keyAlias));
View Full Code Here

Examples of org.jboss.soa.esb.services.security.auth.AuthenticationRequest

        HashSet<Object> credentials = new HashSet<Object>();
        credentials.add(publicCred);
        credentials.add(privateCred);

        AuthenticationRequest authRequest = new AuthenticationRequestImpl.Builder(user, credentials).build();
        assertTrue(securityContext.compareTo(authRequest));

        credentials = new HashSet<Object>();
        credentials.add("public-modified-secret".getBytes());
        authRequest = new AuthenticationRequestImpl.Builder(user, credentials).build();
View Full Code Here

Examples of org.jboss.soa.esb.services.security.auth.AuthenticationRequest

            {
                initialiseWSAProps(esbReq, soapIncomingProps) ;
            }
           
            // Extract security info from SOAPMessage.
            AuthenticationRequest authRequest = extractSecurityDetails(request, esbReq);
          ExtractorUtil.addAuthRequestToMessage(authRequest, esbReq);

            // We should be able to return null here but this causes JBossWS to NPE.
            final Message esbRes = deliverMessage(esbReq) ;
           
View Full Code Here

Examples of org.jboss.soa.esb.services.security.auth.AuthenticationRequest

            System.out.println("Usage SendEsbMessage <category> <name> <text to send> <username> <password>");
        }
        Message esbMessage = MessageFactory.getInstance().getMessage();
       
    //  create an AuthenticationRequest
    AuthenticationRequest authRequest = new AuthenticationRequestImpl.Builder().username(args[3]).password(args[4].toCharArray()).build();
   
    //   set the authentication request on the message
    esbMessage.getContext().setContext(SecurityService.AUTH_REQUEST, PublicCryptoUtil.INSTANCE.encrypt((Serializable) authRequest));
   
        final String message = args[2];
View Full Code Here

Examples of org.openmhealth.reference.request.AuthenticationRequest

    // Create the authentication request from parameters.
    AuthenticationToken token =
      handleRequest(
        request,
        response,
        new AuthenticationRequest(username, password));
   
    // Add a cookie for the authentication token.
    Cookie cookie =
      new Cookie(PARAM_AUTHENTICATION_AUTH_TOKEN, token.getToken());
    // Set the expiration on the cookie.
View Full Code Here

Examples of org.structr.cloud.message.AuthenticationRequest

      // store password in client
      client.setPassword(password);

      // send authentication container
      client.send(new AuthenticationRequest(userName, maxKeyLen));
      context.progress();

      client.waitForAuthentication();

      // do transmission in an authenticated and encrypted context
View Full Code Here

Examples of org.voltdb.security.AuthenticationRequest

            /*
             * Don't use the auth system during recovery. Not safe to use
             * the node to initiate multi-partition txns during recovery
             */
            if (!VoltDB.instance().rejoining()) {
                AuthenticationRequest arq;
                if (ap == AuthProvider.KERBEROS) {
                    arq = context.authSystem.new KerberosAuthenticationRequest(socket);
                } else {
                    arq = context.authSystem.new HashAuthenticationRequest(username, password);
                }
                /*
                 * Authenticate the user.
                 */
                boolean authenticated = arq.authenticate();

                if (!authenticated) {
                    Exception faex = arq.getAuthenticationFailureException();

                    boolean isItIo = false;
                    for (Throwable cause = faex; faex != null && !isItIo; cause = cause.getCause()) {
                        isItIo = cause instanceof IOException;
                    }
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.