解决PostMan请求Oauth2刷新token报401 Unauthorized和Invalid_client Bad Client Credentials问题

一、首先拿到生成的token和刷新token

{
     
    "access_token": "e0140394-918f-4301-b4b4-2ab7adf77a31",
    "token_type": "bearer",
    "refresh_token": "2b2ce3b5-7f6e-4cc4-8cef-822b6246b1b9",
    "expires_in": 3564,
    "scope": "server",
    "user_id": 1,
    "username": "admin"
}

解决PostMan请求Oauth2刷新token报401 Unauthorized和Invalid_client Bad Client Credentials问题_第1张图片
二、在body中输入一下参数
解决PostMan请求Oauth2刷新token报401 Unauthorized和Invalid_client Bad Client Credentials问题_第2张图片
三、接着在Authorization中type选择Basic Auth,填写UserName=client_id和Password=client_secret
解决PostMan请求Oauth2刷新token报401 Unauthorized和Invalid_client Bad Client Credentials问题_第3张图片
刷新令牌应用场景:一般在用户登录系统后,令牌快过期时,系统自动帮助用户刷新令牌,提高用户的体验感

你可能感兴趣的:(oAuth2)