openid-connect

Custom parameter with Microsoft.Owin.Security.OpenIdConnect and AzureAD v 2.0 endpoint

随声附和 提交于 2019-12-04 12:23:55
I am migrating my Azure AD secured application to the v2.0 endpoint. I need to pass a custom parameter to the reply uri. With former Azure AD endpoint I did it by adding a usual query parameter to the reply url. e.g. https://myserver.com/myredirect_uri?mycustomparamerter=myvalue Unfortunately, with endpoint 2.0 I received an error saying that the reply uri does not match the one registered. Of course my custom parameter value is dynamic and I cannot hardcode it. I was looking to exploit the 'state' parameter described in OAUTH flow . However, I am using Microsoft.Owin.Security.OpenIdConnect

Unable to Retrieve Claims in .NET Core 2.0

怎甘沉沦 提交于 2019-12-04 11:28:45
问题 I am using an OpenId Connect Authentication Server , specifically Identity Server 4 (version 1.5.2) on .NET Core 1.1. I have this running with ASP.NET Framework MVC 5 and ASP.NET Core 1.1 MVC web applications. The following configuration is from a .NET Core 1.1 web application: public void Configure( IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory) { app.UseDeveloperExceptionPage(); app.UseStatusCodePages(); app.UseRewriter(new RewriteOptions()

Azure AD automatically added offline_access

雨燕双飞 提交于 2019-12-04 11:24:10
For Microsoft OAuth 2.0 auth code grant , we have encountered an issue with scopes. When we requestion only the User.Read scope, our client is asked to grant permission to us for Sign you in and read your profile and Access your data anytime . Where we didn't state we need offline_access scope. This is only happening after Microsoft switched to new permission grant interface. Have someone else encounter the same issue or we did something wrong? The response_type we pass in is code only. I have double checked, the application we registered is under https://apps.dev.microsoft.com . The URL we

IdentityServer 4, OpenIdConnect redirect to external sign-in url

纵饮孤独 提交于 2019-12-04 09:37:19
问题 I am trying to build multiple small ASP.Net core Mvc services that connect to a Identity server built using IdentityServer4. I have setup the OpenIdOption on the MVC services that looks like this app.UseCookieAuthentication(new CookieAuthenticationOptions { AuthenticationScheme = "Cookies" }); app.UseOpenIdConnectAuthentication(new OpenIdConnectOptions { AuthenticationScheme = "oidc", SignInScheme = "Cookies", Authority = "http://localhost:5000", RequireHttpsMetadata = false, ClientId = "mvc"

Add Owin Pipeline Middleware after OwinStartup for new Tenant

人走茶凉 提交于 2019-12-04 08:45:56
I have a multi-tenant application where each tenant can define their own ClientID, Authority, etc for either WsFed or OpenIdConnect. All the tenants are registered in the OwinStartup as below: public void Configuration(IAppBuilder app) { List<WsFederationAuthenticationOptions> WsFedTenantOptions = BuildWsFedTenantOptionsList(); List<OpenIdConnectAuthenticationOptions> OpenIdConnectTenantOptions = BuildOpenIdConnectTenantOptionsList(); app.SetDefaultSignInAsAuthenticationType(CookieAuthenticationDefaults.AuthenticationType); app.UseCookieAuthentication(new CookieAuthenticationOptions() {

Login to Keycloak using API

陌路散爱 提交于 2019-12-04 08:06:25
问题 I have 2 different applications: say Application1 and Application2 . I have integrated Application2 with keycloak and I am able to login to this application using Keycloak's login page. Now what I want is, if I login to my Application1 (without keycloak), I should be able to call some API of keycloak to login to application2 (without rendering keycloak's login page). It is feasible? If yes, how? Any help will be highly appreciated. Thanks 回答1: You are effectively asking your users to trust

What OpenID Connect authorization flow to authenticate mobile app users?

末鹿安然 提交于 2019-12-04 08:04:53
问题 This question was migrated from Information Security Stack Exchange because it can be answered on Stack Overflow. Migrated 4 years ago . I am building a cross-platform mobile app that interacts with a RESTful API, and I want to use OpenID Connect to authenticate my users. I will be building my own OpenID Connect provider server. OpenID.net claims that: OpenID Connect allows for clients of all types, including browser-based JavaScript and native mobile apps, to launch sign-in flows and receive

Too many OpenID.nonce cookies cause “Bad Request”

我怕爱的太早我们不能终老 提交于 2019-12-04 07:45:57
I have already gone through links here , here and here which are related to issue I am having. I have Silverlight application using IdentiServer3 for authentication and I started having this issue just now when I implemented log out functionality. Note that the issue has nothing to do with Silverlight because login and logout functionality is actually implemented on the server side which is a classic ASP.Net Web form. (.NET 4.5.1) The application never had logout functionality, so user just used to close the browser so we never encountered this issue before. We have now logout.aspx page and

ASP.NET Core 2.1 cookie authentication appears to have server affinity

只谈情不闲聊 提交于 2019-12-04 07:36:47
I'm developing an application in ASP.NET Core 2.1, and running it on a Kubernetes cluster. I've implemented authentication using OpenIDConnect, using Auth0 as my provider. This all works fine. Actions or controllers marked with the [Authorize] attribute redirect anonymous user to the identity provider, they log in, redirects back, and Bob's your uncle. The problems start occurring when I scale my deployment to 2 or more containers. When a user visits the application, they log in, and depending on what container they get served during the callback, authentication either succeeds or fails. Even

authorizationGrantType cannot be null in Spring Security 5 OAuth Client and Spring Boot 2.0

混江龙づ霸主 提交于 2019-12-04 05:14:00
I followed the Spring Security 5.0 official reference documentation and sample codes oauth2login to setup OAuth2/OIDC authentication in my project, but it failed and I got the following exception when I booted up my application by mvn spring-boot:run . org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'clientRegistrationRepository' defined in class path resource [org/springframework/boot/autoconfigure/security/oauth2/client/OAuth2ClientRegistrationRepositoryConfiguration.class]: Bean instantiation via factory method failed; nested exception is org