类 tokenUnit


public class tokenUnit extends AppBase
  • 构造器详细资料

    • tokenUnit

      public tokenUnit()
  • 方法详细资料

    • checkLoginToken

      public static boolean checkLoginToken(String ltoken)
      检查登陆主token状态
      参数:
      ltoken - 登陆主token
      返回:
      返回token是否有效
    • getUIDbyLoginToken

      public static Long getUIDbyLoginToken(String ltoken)
      通过登陆token获取用户ID
      参数:
      ltoken -
      返回:
    • getSession

      public static org.hibernate.Session getSession(String session, Class<?> clazz, DataEntity dataEntity)
    • VerifyLoginToken

      public static boolean VerifyLoginToken(String LoginToken)
    • newAppToken

      public static String newAppToken(String AppKey, String time)
      返回加密后的AppToken
      参数:
      AppKey - App内部key
      time - App内部生成的time
      返回:
    • VerifyAppToken

      public static boolean VerifyAppToken(String AppName, String AppToken, String time)
      验证App的Token
      参数:
      AppName - 传入App名
      AppToken - 传入Token
      time - 传入时间
      返回:
      返回验证结果
    • VerifyPermissionToken

      public static boolean VerifyPermissionToken(String PerToken, String type, String AppName, String AppToken, String time)
      验证权限Token是否正确
      参数:
      PerToken - 权限token
      type - 传入权限token的类型
      AppName - App/Plugin 名
      AppToken - App的内部token
      time - App内部时间戳
      返回:
      返回权限Token是否正确
    • getUIDbyToken

      public static Long getUIDbyToken(String Token)
      通过有效的token获取UID
      参数:
      Token - 传入token(不限类型)
      返回:
      返回UID
    • newToken

      public static String newToken(String type, String appToken)
      创建一个新Token
      参数:
      type - token的类型
      appToken - App的内部token
      返回:
      返回String类型的token