Examples of WebAuthenticationDetails


Examples of org.acegisecurity.ui.WebAuthenticationDetails

     * @param authRequest the authentication request object that should have
     *        its details set
     */
    protected void setDetails(HttpServletRequest request,
        UsernamePasswordAuthenticationToken authRequest) {
        authRequest.setDetails(new WebAuthenticationDetails(request));
    }
View Full Code Here

Examples of org.acegisecurity.ui.WebAuthenticationDetails

            password = "";
        }

        UsernamePasswordAuthenticationToken authRequest = new UsernamePasswordAuthenticationToken(username,
                password);
        authRequest.setDetails(new WebAuthenticationDetails(request));

        return this.getAuthenticationManager().authenticate(authRequest);
    }
View Full Code Here

Examples of org.acegisecurity.ui.WebAuthenticationDetails

            if ((existingAuth == null)
                || !existingAuth.getName().equals(username)
                || !existingAuth.isAuthenticated()) {
                UsernamePasswordAuthenticationToken authRequest = new UsernamePasswordAuthenticationToken(username,
                        password);
                authRequest.setDetails(new WebAuthenticationDetails(
                        httpRequest, false));

                Authentication authResult;

                try {
View Full Code Here

Examples of org.acegisecurity.ui.WebAuthenticationDetails

                    + "' with response: '" + responseDigest + "'");
            }

            UsernamePasswordAuthenticationToken authRequest = new UsernamePasswordAuthenticationToken(user,
                    user.getPassword());
            authRequest.setDetails(new WebAuthenticationDetails(httpRequest));

            SecurityContextHolder.getContext().setAuthentication(authRequest);
        }

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

Examples of org.acegisecurity.ui.WebAuthenticationDetails

        Assert.isInstanceOf(HttpServletRequest.class, request,
            "ServletRequest must be an instance of HttpServletRequest");

        AnonymousAuthenticationToken auth = new AnonymousAuthenticationToken(key,
                userAttribute.getPassword(), userAttribute.getauthorities());
        auth.setDetails(new WebAuthenticationDetails(
                (HttpServletRequest) request));

        return auth;
    }
View Full Code Here

Examples of org.acegisecurity.ui.WebAuthenticationDetails

     * @param authRequest the authentication request object that should have
     *        its details set
     */
    protected void setDetails(HttpServletRequest request,
        UsernamePasswordAuthenticationToken authRequest) {
        authRequest.setDetails(new WebAuthenticationDetails(request));
    }
View Full Code Here

Examples of org.acegisecurity.ui.WebAuthenticationDetails

                        // create the new authentication token
                        targetUserRequest = new UsernamePasswordAuthenticationToken(targetUser,
                                targetUser.getPassword(), authorities);

                        // set details
                        targetUserRequest.setDetails(new WebAuthenticationDetails(
                                request));

                        return targetUserRequest;
                    }
View Full Code Here

Examples of org.acegisecurity.ui.WebAuthenticationDetails

            X509Certificate clientCertificate = extractClientCertificate(httpRequest);

            try {
                X509AuthenticationToken authRequest = new X509AuthenticationToken(clientCertificate);

                authRequest.setDetails(new WebAuthenticationDetails(httpRequest));
                authResult = authenticationManager.authenticate(authRequest);
                successfulAuthentication(httpRequest, httpResponse, authResult);
            } catch (AuthenticationException failed) {
                unsuccessfulAuthentication(httpRequest, httpResponse, failed);
            }
View Full Code Here

Examples of org.beangle.security.web.auth.WebAuthenticationDetails

    Authentication auth = SecurityContextHolder.getContext().getAuthentication();
    if (null == auth) return;
    log.setOperater(auth.getName());
    Object details = auth.getDetails();
    if ((details instanceof WebAuthenticationDetails)) {
      WebAuthenticationDetails webDetails = (WebAuthenticationDetails) details;
      log.setIp(webDetails.getAgent().getIp());
      log.setAgent(webDetails.getAgent().getOs()+" "+webDetails.getAgent().getBrowser());
      log.setEntry(sessionRegistry.getResource(webDetails.getSessionId()));
    }
    entityDao.saveOrUpdate(log);
  }
View Full Code Here

Examples of org.beangle.security.web.auth.WebAuthenticationDetails

    SessioninfoBean info = new SessioninfoBean(sessionid, serverName, auth.getName(),
        principal.getFullname());
    info.setCategory(principal.getCategory());
    Object details = auth.getDetails();
    if (details instanceof WebAuthenticationDetails) {
      WebAuthenticationDetails webdetails = (WebAuthenticationDetails) details;
      info.setAgent(webdetails.getAgent().getBrowser().toString());
      info.setOs(webdetails.getAgent().getOs().toString());
      info.setIp(webdetails.getAgent().getIp());
    }
    return info;
  }
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.