Package org.jboss.web.tomcat.security.login

Examples of org.jboss.web.tomcat.security.login.WebAuthentication.login()


         // Make programatic login if authenticated credentials are present in session - they were set in another cluster node
         if (credentials != null && httpRequest.getRemoteUser() == null)
         {
            WebAuthentication pwl = new WebAuthentication();
            pwl.login(credentials.getUsername(), credentials.getPassword());

         }

         chain.doFilter(request, response);
View Full Code Here


   throws ServletException
   {
      if(username == null || pass == null)
         throw new RuntimeException("username or password is null");
      WebAuthentication pwl = new WebAuthentication();
      pwl.login(username, pass);

      //Only when there is web login, does the principal become visible
      log("User Principal=" + request.getUserPrincipal());
      log("isUserInRole(Authorized User)=" + request.isUserInRole("AuthorizedUser"));
      if(request.getUserPrincipal() == null || !request.isUserInRole("AuthorizedUser"))
View Full Code Here

            SecurityAdaptor securityAdaptor = spiProvider.getSPI(SecurityAdaptorFactory.class).newSecurityAdapter();

            if (securityAdaptor != null && securityAdaptor.getPrincipal() != null && securityAdaptor.getPrincipal().getName() != null && securityAdaptor.getCredential() != null)
            {
               WebAuthentication wa = new WebAuthentication();
               wa.login(securityAdaptor.getPrincipal().getName(), securityAdaptor.getCredential());
            }
            else
            {
               log.debug("No securityAdaptor available. Cannot add credentials from the WS Security");
            }
View Full Code Here

   throws ServletException
   {
      if(username == null || pass == null)
         throw new RuntimeException("username or password is null");
      WebAuthentication pwl = new WebAuthentication();
      pwl.login(username, pass);

      //Only when there is web login, does the principal become visible
      log("User Principal=" + request.getUserPrincipal());
      log("isUserInRole(Authorized User)=" + request.isUserInRole("AuthorizedUser"));
      if(request.getUserPrincipal() == null || !request.isUserInRole("AuthorizedUser"))
View Full Code Here

            // Make programatic login if authenticated credentials are present in session - they were set in another cluster
            // node
            if (credentials != null && httpRequest.getRemoteUser() == null) {
                WebAuthentication pwl = new WebAuthentication();
                pwl.login(credentials.getUsername(), credentials.getPassword());

            }

            chain.doFilter(request, response);
View Full Code Here

            // Make programatic login if authenticated credentials are present in session - they were set in another cluster
            // node
            if (credentials != null && httpRequest.getRemoteUser() == null) {
                WebAuthentication pwl = new WebAuthentication();
                pwl.login(credentials.getUsername(), credentials.getPassword());

            }

            chain.doFilter(request, response);
View Full Code Here

        
         // Make programatic login if authenticated credentials are present in session - they were set in another cluster node
         if (credentials != null && httpRequest.getRemoteUser() == null)
         {
            WebAuthentication pwl = new WebAuthentication();
            pwl.login(credentials.getUsername(), credentials.getPassword());

         }

         chain.doFilter(request, response);
View Full Code Here

         SecurityAdaptor securityAdaptor = spiProvider.getSPI(SecurityAdaptorFactory.class).newSecurityAdapter();

         if (securityAdaptor != null && securityAdaptor.getPrincipal() != null && securityAdaptor.getPrincipal().getName() != null && securityAdaptor.getCredential() != null)
         {
            WebAuthentication wa = new WebAuthentication();
            wa.login(securityAdaptor.getPrincipal().getName(), securityAdaptor.getCredential());
         }
         else
         {
            log.debug("No securityAdaptor available. Cannot add credentials from the WS Security");
         }
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.