Package org.springside.examples.quickstart.service.account.ShiroDbRealm

Examples of org.springside.examples.quickstart.service.account.ShiroDbRealm.ShiroUser


  /**
   * 取出Shiro中的当前用户LoginName.
   */
  private String getCurrentUserName() {
    ShiroUser user = (ShiroUser) SecurityUtils.getSubject().getPrincipal();
    return user.loginName;
  }
View Full Code Here


  /**
   * 取出Shiro中的当前用户Id.
   */
  private Long getCurrentUserId() {
    ShiroUser user = (ShiroUser) SecurityUtils.getSubject().getPrincipal();
    return user.id;
  }
View Full Code Here

  /**
   * 取出Shiro中的当前用户Id.
   */
  private Long getCurrentUserId() {
    ShiroUser user = (ShiroUser) SecurityUtils.getSubject().getPrincipal();
    return user.id;
  }
View Full Code Here

  /**
   * 更新Shiro中当前用户的用户名.
   */
  private void updateCurrentUserName(String userName) {
    ShiroUser user = (ShiroUser) SecurityUtils.getSubject().getPrincipal();
    user.name = userName;
  }
View Full Code Here

  private TaskDao mockTaskDao;

  @Before
  public void setUp() {
    MockitoAnnotations.initMocks(this);
    ShiroTestUtils.mockSubject(new ShiroUser(3L, "foo", "Foo"));
  }
View Full Code Here

TOP

Related Classes of org.springside.examples.quickstart.service.account.ShiroDbRealm.ShiroUser

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.