Package org.beangle.ems.security.service

Examples of org.beangle.ems.security.service.UserToken


  private static ThreadLocal<String> resource = new ThreadLocal<String>();

  private static UserToken getPrincipal() {
    Authentication auth = SecurityContextHolder.getContext().getAuthentication();
    if (null == auth) throw new AuthenticationException();
    UserToken user = (UserToken) auth.getPrincipal();
    if (null == user.getId()) throw new AuthenticationException();
    return user;
  }
View Full Code Here


import org.beangle.security.core.userdetail.UserDetailService;

public class SimpleUserDetailServiceImpl implements UserDetailService<Authentication> {

  public UserDetail loadDetail(Authentication token) {
    UserToken user = new UserToken(1L, token.getName(), token.getName(), "NULL", "user category a", true,
        false, false, false, new ArrayList<GrantedAuthority>());
    return user;
  }
View Full Code Here

  private static ThreadLocal<String> resource = new ThreadLocal<String>();

  public static UserToken getPrincipal() {
    Authentication auth = SecurityContextHolder.getContext().getAuthentication();
    if (null == auth) throw new AuthenticationException();
    UserToken user = (UserToken) auth.getPrincipal();
    if (null == user.getId()) throw new AuthenticationException();
    return user;
  }
View Full Code Here

TOP

Related Classes of org.beangle.ems.security.service.UserToken

Copyright © 2018 www.massapicom. 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.