java.lang.Object
io.github.mangocrisp.spring.taybct.gateway.util.JWTUtil

public class JWTUtil extends Object
JWT 工具类
从以下版本开始:
1.0.0
  • 构造器概要

    构造器
    构造器
    说明
     
  • 方法概要

    修饰符和类型
    方法
    说明
    static com.alibaba.fastjson2.JSONObject
    decode(String token)
     
    static com.alibaba.fastjson2.JSONObject
    decode(org.springframework.web.reactive.function.server.ServerRequest request)
    解析 JWT TOKEN
    从请求对象中获取到 token 然后解析成 JSON,解析推算会报错,那这个时候,可以做一下 token 验证不通过的操作,比如返回 401 什么的

    从类继承的方法 java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 构造器详细资料

    • JWTUtil

      public JWTUtil()
  • 方法详细资料

    • decode

      public static com.alibaba.fastjson2.JSONObject decode(org.springframework.web.reactive.function.server.ServerRequest request)
      解析 JWT TOKEN
      从请求对象中获取到 token 然后解析成 JSON,解析推算会报错,那这个时候,可以做一下 token 验证不通过的操作,比如返回 401 什么的
      参数:
      request - 请求对象
      返回:
      JSONObject
      从以下版本开始:
      1.0.0
    • decode

      @Nullable public static com.alibaba.fastjson2.JSONObject decode(String token)