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

com.quhaodian.shiro.realm.AuthToken Maven / Gradle / Ivy

There is a newer version: 1.8.31
Show newest version
package com.quhaodian.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