package com.ff.weijinxiao.util;


import com.ff.weijinxiao.jwt.JwtHelper;

import javax.servlet.http.HttpServletRequest;

/*
 * 解析获取用户
 */
public class RequestTool {

    public static String parseRequest(HttpServletRequest request) {
        String token = request.getHeader("token");
        if(null == token) {
            return null;
        }
        String account = JwtHelper.parseToken(token);
        return account;
    }

}
