identityserver4 (ids4)中如何获取refresh_token刷新令牌token 使用offline_access作用域

ids4默认自带的api接口/api/connect/token

调用这个接口的时候,需要在body里面的

x-www-form-urlencoded模式下写

{
    grant_type: "password",   ----这里我使用的是密码模式
    scope: " 你项目的作用域   offline_access",
    username: "你的密码",
    password: "你的密码",
    client_id: "admin",
    client_secret: "123456"
  };
要想获得refresh_token刷新令牌token,必须在scope里加一个 offline_access。
这样你就获取刷新令牌了

 

 

posted @ 2022-05-23 16:58  畅聊科技  阅读(996)  评论(0编辑  收藏  举报