All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.haoxuer.discover.user.shiro.realm.AuthToken Maven / Gradle / Ivy

There is a newer version: 2.2.2
Show newest version
package com.haoxuer.discover.user.shiro.realm;

import org.apache.shiro.authc.RememberMeAuthenticationToken;

/**
 * Created by ada on 2017/6/9.
 */
public class AuthToken implements RememberMeAuthenticationToken {
  private String ticket = null;
  private String userId = null;
  private boolean isRememberMe = false;

  public AuthToken(String ticket) {
    this.ticket = ticket;
  }

  /**
   * 当事人
   *
   * @return
   */
  public Object getPrincipal() {
    return this.userId;
  }

  /**
   * 凭据
   *
   * @return
   */
  public Object getCredentials() {
    return this.ticket;
  }

  public void setUserId(String userId) {
    this.userId = userId;
  }

  public boolean isRememberMe() {
    return this.isRememberMe;
  }

  public void setRememberMe(boolean isRememberMe) {
    this.isRememberMe = isRememberMe;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy