ws-federation

IDX10503: Signature validation failed after updating to Owin.Security v 4.0.0

江枫思渺然 提交于 2019-12-13 04:13:58
问题 As per subject, I updated the Owin.Security.WsFederation and dependent packages to version 4.0 and I get the error. I did not make any code changes other than changing using Microsoft.IdentityModel.Protocols; to using Microsoft.IdentityModel.Protocols.WsFederation; where is the WsFederationConfiguration class seems to be now. Here is my StartupAuth : public void ConfigureAuth(IAppBuilder app) { app.UseCookieAuthentication( new CookieAuthenticationOptions { AuthenticationType =

OwinMiddleware Authentication (ws federation) - MVC5 Identity 2 - IDX10201: None of the the SecurityTokenHandlers could read the 'securityToken'

淺唱寂寞╮ 提交于 2019-12-13 02:04:32
问题 I'm trying to Authenticate toward an ACS server, I do manage to get authenticated with http modules the old way through the config file but I can't git it to work with owin. Here is the relevants part of my startup app.UseCookieAuthentication( new CookieAuthenticationOptions { AuthenticationType = WsFederationAuthenticationDefaults.AuthenticationType }); app.UseWsFederationAuthentication( new WsFederationAuthenticationOptions { MetadataAddress = "https://*******.accesscontrol.windows.net

ADAL.Net TokenCache throwing server timeout error with 500 error code

主宰稳场 提交于 2019-12-12 02:18:14
问题 I am trying to integrate WS-Federation in my Asp.Net MVC app using OWIN. I followed the github samples and it is working as expected. Now I want to take this one step further and call an external WebApi hosted on different Azure web app from within my website. I couldn't find any WS-Fed samples for this scenario. WebApi needs an access token to provide access to protected resources. In one of my MVC controllers I tried using ADAL.Net code to acquire the access token but i get timeout error.

URL fragment lost as part of SAML token authentication; workaround / standard pattern?

这一生的挚爱 提交于 2019-12-10 15:23:43
问题 Several web application authentication protocols (like WS-Federation and the SAML protocol, i.e., so-called 'passive' protocols, and apparently also ASP.NET Forms authentication, see this StackOverflow question, and AppEngine, see this GWT bug comment) lose the original 'URL fragment', i.e. the part after the #-sign. What happens is roughly the following: in a clean browser (so no cached info/cookies/login information) I open URL (1) http://example.com/myapp/somepage?some=parameter#somewhere.

Prevent XmlHttpRequest redirect response in .Net MVC WS-Federation Site

霸气de小男生 提交于 2019-12-09 18:20:20
问题 I'm using WS Federated (Claims Aware) authentication on an MVC 3 site and am having trouble keeping some of my API controllers that send JSON from returning a redirect when the authentication fails. I have an Area called API with several controllers that just return JSON, these controllers all inherit from the same base class. I want to send down legitimate 401 error responses instead of 302 redirects that are happening by default. I followed some directions I found for creating a custom

How do I move federationConfiguration out of web.config and to some custom config file and load it dynamically by code

时间秒杀一切 提交于 2019-12-09 06:54:31
问题 I have my configuration in web.config and it works fine. <configuration> <system.identityModel.services> <federationConfiguration> .... </federationConfiguration> </system.identityModel.services> </configuration> How do I move this out of web.config to a custom config file and load it from code? I want to use the same structure of this configuration so that I do not have to change anything in code if I have to change this configuration file. 回答1: You can tap into the WIF event from your

WIF- ID1014: The signature is not valid. The data may have been tampered with

偶尔善良 提交于 2019-12-09 05:33:05
问题 I've been using WIF to authenticate our new website, the STS is based upon the starter-sts implementation. To enable this to work correctly on out load balanced environment I've used the following in the global.asax to override the default certificate behaviour. void onServiceConfigurationCreated(object sender, ServiceConfigurationCreatedEventArgs e) { List<CookieTransform> sessionTransforms = new List<CookieTransform>(new CookieTransform[] { new DeflateCookieTransform(), new

How to trap a WS-Federation callback in an OWIN MVC5 app to automatically create an identity in local database?

会有一股神秘感。 提交于 2019-12-08 08:12:55
问题 I am currently working on a vb.net MVC5 application and using WS-Federation to authenticate all the users from an ADSF 3.0 server. Everything is working fine; when the users try to access a secured controller marked with the AUTHORIZE attribute, the users are redirected to the STS login page, they login and they come back. I am able to read the CLAIMS provided by the ADFS server. My problem is that i need to create a local entry in my database when a new authenticated user comes in after

How to avoid 'SamlAssertion.NotOnOrAfter condition is not satisfied' errors

与世无争的帅哥 提交于 2019-12-07 22:44:45
问题 Recently I have started using claim-based authentication on an existing web application. Because the application makes use of jQuery & more notably, the AJAX functions, I have had to alter the handlers not to attempt to redirect the XmlHTTPRequests , and instead return a 403 status which is easier to handle. Here is the FederatedAuthentication.WSFederationAuthenticationModule.AuthorizationFailed event hanlder: protected void WSFederationAuthenticationModule_AuthorizationFailed(object sender,

How do I support streaming in WSFederationHttpBinding?

放肆的年华 提交于 2019-12-07 01:00:32
I have a wcf service which is used to upload and download large files to server. I'm using MTOM message encoding and I want to use streamed transfer mode. But we are using wsFederationHttpBinding. How do I support streaming in wsFederationHttpBinding? My WCF Service web.config code is given below, <wsFederationHttpBinding> <binding name="UploadserviceFederation" messageEncoding="Mtom" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" > <readerQuotas maxStringContentLength="2147483647" maxDepth="2147483647" maxBytesPerRead="2147483647" maxArrayLength="2147483647"/> <security