问题标签 [identityserver4]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
c# - IdentityServer、ASP.NET Core 和 Web API
我已经设置了 IdentityServer4 和另一个客户端 ASP.NET Core 应用程序。客户端需要通过 IdentityServer 进行身份验证并请求访问标准 MVC Web API 项目的第三个应用程序。
我已按照此示例https://identityserver.github.io/Documentation/docsv2/overview/simplestOAuth.html实现客户端凭据流的步骤
现在我完全不知道如何让 WEB API 首先识别承载令牌,然后给我一些授权来访问 web api 端点。
这是我的 IdentityServer Statrup.cs
和 Config.cs
ASP.NET Core 调用 IdentityServer 和 Web API
那么任何人都可以解释或分享一些关于我应该怎么做才能让 WEB APi(带有 owin 中间件)来处理来自 ASP.NET Core 客户端的调用的链接吗?我应该在 Owin 配置(IAppBuilder 应用程序)方法中放置什么设置。
angular - 身份服务器:令牌类型 jwt 与使用具有 OIDC 的隐式流身份验证的参考
我遵循 damienbod Ang2 Id Serv 4 OIDC提供的示例,其中我有以下内容:身份服务器(修改后的实现)、资源 API 和 ng-2 应用程序。
从身份服务器获得身份验证并尝试访问我受保护的 API 后,它总是给我错误 401(未经授权)。
我已将身份服务器上的客户端更改为使用 jwt 的令牌类型而不是引用,然后它就起作用了。
身份服务器上的客户端配置:
资源 API:身份验证
我需要知道,为什么 jwt 令牌类型使其工作以及修改哪些代码以使引用类型令牌工作?
.net - DiscoveryClient.GetAsync("http://localhost:5000") 崩溃
如标题:控制台应用程序在执行以下行时崩溃
没有抛出异常,即使我将它包装在try catch
调试中也只是在线中断;输出中没有相关信息。Visual Studio 只是停止调试应用程序并返回到编辑模式。
有没有人遇到过类似的事情?:( 我可以尝试做什么?
我正在使用 VS2015,控制台应用程序是 .NETCoreApp v1.0,使用“IdentityModel”:“2.0.0-rc6”;。Identity Server 4 在 localhost:5000、.NETCoreApp v1.0 上运行。
使用https://demo.identityserver.io参数调用GetAsync
方法也会导致错误描述。
我正在关注本教程:https ://identityserver4.readthedocs.io/en/dev/quickstarts/1_client_credentials.html
c# - 使用外部身份验证.NET Core IdentityServer4 缓存用户配置文件
整个身份概念的新手,但我已经进行了几次 Google 搜索,但没有找到我认为合适的回复。
我将 .NET Core 1.0.0 与 EF Core 和 IdentityServer 4 (ID4) 一起使用。ID4 位于单独的服务器上,我在客户端获得的唯一信息是声明。我想访问完整的(扩展的)用户配置文件,最好从 User.Identity 访问。
那么如何设置以便 User.Identity 填充 ApplicationUser 模型上的所有属性,而无需每次都发送数据库请求?我希望将信息存储在身份验证缓存中,直到会话结束。
我不想做的是在每个控制器中设置一个查询来获取附加信息。客户端上的所有控制器都将从基本控制器继承,这意味着如果有必要,我可以 DI 一些服务。
提前致谢。
客户
ID4
应用用户模型
asp.net - Using Core MVC Client with IdentityServer v3 - The client application is not known or is not authorized
I've a non core webapi and a identityserver v3. now i want to implement a asp core website.
The asp core test website runs on http://localhost:49946/
Is it possible to use a asp core site with an identityserver v3 sts server? Are there any known issues?
I tried it but i always get
The client application is not known or is not authorized.
I made sure that the redirect uri and the client id match.
Here my client config in the identityserver
Here the config for the asp core mvc client
here the url that the client redirects to when he wants to authenticate. there you can see that redirect uri is set to http://localhost:49946/
Is this just a compatibility issue ? anything i'm overseeing?
-- Update
Thx to the hint of leastprivilege i found the solution in the log. there was a unexpected subpath /signin-oidc
In Trace I see
owin - IdentityServer4 和 Web API .NET 4.6.2
是否有可以与标准 .NET 4.6.2(非核心)框架一起使用的 OWIN 中间件来验证来自 IdentityServer4 的令牌。
类似于 https://github.com/IdentityServer/IdentityServer4.AccessTokenValidation
c# - 具有 OAuth 和 ADFS 的 Identity Server 4
我在将 OAuthAuthentication 与 IS4 和 ASPNetCore 一起使用时遇到问题。使用带有 AspNetIdentity 的 DamienBod(谢谢)示例身份服务器尝试使用 windows server 2012 ADFS3 添加 OAuth。我可以使用外部 ADFS 进行身份验证,但在 Identity Server 端没有得到正确的结果。
AccountController.ExternalLoginCallback
:var info = await _signInManager.GetExternalLoginInfoAsync()
返回 NULL 并返回登录页面。下面的代码可能有一些在我试验时可能没有意义的东西。现在我几乎达到了我的能力极限,因为我在这方面的知识并不是那么好。非常感谢任何帮助我的代码文件如下:
启动.cs:
`
AccountController.cs:
asp.net - 在 IdentitySer4 资源服务器实现中调用 .ProtectKeysWithCertificate(cert) 方法时出错
最后一行“.ProtectKeysWithCertificate(cert);” 返回错误。但是这里的教程没有。我无法弄清楚为什么“ProtectKeysWithCertificate()”方法正在返回。如果有人可以放纵我,我将非常感激。
谢谢
oauth-2.0 - IdentityServer4 和 ErrorMessage Cookie
我目前正在尝试实施 IdentityServer4 以使用 Azure Active Directory Crendentials 保护我的 AngularJS 1.5 应用程序的 API。
到目前为止它不起作用,我想调查一下。
在 http 响应中,我得到一个带有以某种形式编码的错误消息的 cookie。我试图对它进行base64解码但没有成功,我一直在查看文档以了解我应该如何处理它,但没有找到任何东西。所以问题是:我怎样才能从中获得人类可以理解的信息?
这是它的样子
c# - 有没有办法在不使用端点的情况下从 Identity Server 中生成访问令牌?
我正在构建身份服务器部署(身份服务器 4,托管在 ASP.NET Core MVC 应用程序中)。作为新用户注册过程的一部分,我需要身份服务器应用程序向另一个 API 发出请求。基本上,我想使用客户端凭据流来发出此请求,但不是让身份服务器对自己的端点发出 http 请求,是否可以在 C# 中以编程方式生成令牌?
我想做的是这样的:
我看到ITokenService
IdentityServer4中有一个,但它需要一个TokenCreationRequest
填充的东西,你只有在你有一个http请求(对于一个令牌)来处理时才能得到,所以它似乎只对IdentityServer4本身有用。
我也认识到我可以使用IdentityModel
客户端向我自己的端点发出请求,但这将涉及我想避免的更多配置 - 更不用说我似乎不必这样做在身份服务器应用程序本身内。