【发布时间】:2019-08-13 12:10:26
【问题描述】:
我有一个旧版 web api,它在 .net 4.5.2 web api 中使用如下内容:
OAuthBearerOptions = new OAuthBearerAuthenticationOptions();
app.UseOAuthBearerAuthentication(OAuthBearerOptions);
我们现在正在 .net core 2.2 中重建 api,我想重用相同的 oauth 令牌。来自旧身份验证端点的响应如下所示:
{
"access_token":"",
"refresh_token":""
"token_type":"bearer",
"expires_in":12345,
"as:client_id":"client",
"userName":"email",
"userId":"12345",
"role":"role_id",
"permissions":[],
".issued":"",
".expires":""
}
在我的所有搜索中,.net 核心似乎都专注于 JWT,而不是传统风格的 oauth 令牌。是否可以配置 .net core web api 以重用 4.5.2 web api 中相同形状的数据?
【问题讨论】:
标签: c# asp.net-core asp.net-web-api .net-core