后台返回的token是一个base64的3段字典,返回后是一个字符串
"access_token" = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiJLTmJnVzIiLCJ1c2VybmFtZSI6Im9rb2VyMTI3NzMyMDIiLCJpYXQiOjE0NjY0OTQ4ODgsImV4cCI6MTQ2NzA5OTY4OH0.dzjpmGv3Dvd3si49zVP9ouEavsGRaHgbvMGD3IqPtaU";
需要截取中间一段,反base64
eyJ1aWQiOiJLTmJnVzIiLCJ1c2VybmFtZSI6Im9rb2VyMTI3NzMyMDIiLCJpYXQiOjE0NjY0OTQ4ODgsImV4cCI6MTQ2NzA5OTY4OH0
由于系统原因,需要在后面拼接个字符串 “=”,才能反base64
网友评论