Examples of CategoryPrincipal


Examples of org.beangle.security.core.session.category.CategoryPrincipal

  public Class<? extends Sessioninfo> getSessioninfoClass() {
    return SessioninfoBean.class;
  }

  public Sessioninfo build(Authentication auth, String serverName, String sessionid) {
    CategoryPrincipal principal = (CategoryPrincipal) auth.getPrincipal();
    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());
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.