JWT(JSON Web Token)跨域认证
JWT编码:
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhY2NvdW50IjoiYWRtaW4iLCJwYXNzd29yZCI6IjQ5YmE1OWFiYmU1NmUwNTciLCJpc3MiOiJaaG91RWluIiwiaWF0IjoxNzMyMjgyNjA2LCJleHAiOjE3MzIyODk4MDYsIm5iZiI6MTczMjI3NTQwNiwic3ViIjoiWmhvdUVpbi5jb20iLCJqdGkiOiIwZmMyZjIzYjg0NDRlMzZiNWVmYyIsInVzZXJfaWQiOiJ1c2VyX2lkIiwibm90ZSI6Iue8lui-kUpTT04ifQ.qCbuWrWbSQWKCxNZDdwqq8Yti-DYOkOD6iIYHF1YVAQ
验证结果:
{"status":1,"msg":"验证通过"}
JWT解密 >>>
<<< JWT加密
头部(header):
{ "alg": "HS256", "typ": "JWT" }
负载(payload):
{ "account": "admin", "password": "49ba59abbe56e057", "iss": "ZhouEin", "iat": 1732282606, "exp": 1732289806, "nbf": 1732275406, "sub": "ZhouEin.com", "jti": "0fc2f23b8444e36b5efc", "user_id": "user_id", "note": "编辑JSON" }
密钥(secret):
www.zhouein.com