wif

What's the .NET 4.5 equivalent to UserNameWSTrustBinding?

独自空忆成欢 提交于 2019-12-05 00:32:07
I am converting a active profile STS to the new .NET 4.5 System.IdentityModel framework. My code using the UserNameWSTrustBinding which doesn't seem to exist in the new framework. Any suggestions. Although this is an old question, I couldn't find any non-third-party answer on the internet, so here it is: To replace UserNameWSTrustBinding in .NET 4.5, use the following: var binding = new WS2007HttpBinding(SecurityMode.{what it was before}); binding.Security.Message.ClientCredentialType = MessageCredentialType.UserName; I ported the WCF bindings to thinktecture identity model: https://github.com

Secure WebAPI with a JWT

放肆的年华 提交于 2019-12-04 23:11:05
问题 I'm trying to write a mobile application that will get data from a webapi rest based site. The site should be secured via ACS (as there can be multiple identity providers). My mobile app is currently querying the following url https://xx.accesscontrol.windows.net/v2/metadata/IdentityProviders.js?protocol=javascriptnotify&realm=http://xx.azurewebsites.net/&version=1.0 to get a list of IPs. I then allow the user to choose an IP, and then using a web browser control I show them a login. Once the

Getting “not a valid Base-64 string” on federated identity token

僤鯓⒐⒋嵵緔 提交于 2019-12-04 22:33:29
问题 I am randomly getting a base 64 encoding error when browsing my mvc3 azure web role. I am using WIF with passive authentication to authenticate against my ADFS server. I have not be able to isolate where this is coming from, but I have an idea and am hoping for some feedback/help. From the call stack it looks like it's coming from a bad cookie. The "FedAuth" cookies from wif/adfs are the only thing that show up when i look at my cookies from the chrome developer console. So I am thinking that

Owin OAuth provider “The entity type IdentityUser is not part of the model for the current context”

十年热恋 提交于 2019-12-04 21:26:14
UserManagerFactory = () => new UserManager<IdentityUser>(new UserStore<IdentityUser>()); OAuthOptions = new OAuthAuthorizationServerOptions { TokenEndpointPath = new PathString("/Token"), Provider = new ApplicationOAuthProvider(PublicClientId, UserManagerFactory), AuthorizeEndpointPath = new PathString("/api/AccountOwin/ExternalLogin"), AccessTokenExpireTimeSpan = TimeSpan.FromDays(14), AllowInsecureHttp = true }; From which IdentityUser,UserStore comesform entity framework. I want to use my database instead of local db, I generated the "generate" script from the local db tables and I created

Is it possible to tell IIS to treat all old cookies as expired? (CryptographicException)

岁酱吖の 提交于 2019-12-04 21:08:07
We are using WIF authentication, and we have an issue that pops up on occassion where a users cookie gets in a bad state. The exception that gets thrown is: System.InvalidOperationException: ID1073: A CryptographicException occurred when attempting to decrypt the cookie using the ProtectedData API (see inner exception for details). If you are using IIS 7.5, this could be due to the loadUserProfile setting on the Application Pool being set to false. ---> System.Security.Cryptography.CryptographicException: Key not valid for use in specified state. at System.Security.Cryptography.ProtectedData

Custom Claims with Geneva framework and how to “synch” users whitin your app

喜欢而已 提交于 2019-12-04 19:31:51
Maybe this question highlights how little I know about claims identity management, but here it goes. If using WIF within an application that uses a third party STS for Identity and that uses custom claims for authorization ( something pertinent and specificto the application like CanCreateFooBar ) 1) How do I manage the users? Ie, the users from say AD or other membership provider can be identified, but internally in my system i need to know about them and have more user information that has nothing to do with Identity ( so it woulndt really make sense to have this info available outside the

How to get user groups from on-premise ADFS claims

烂漫一生 提交于 2019-12-04 18:43:55
I have followed this article to build demo app with on-premise ADFS federation. http://www.cloudidentity.com/blog/2014/02/12/use-the-on-premises-organizational-authentication-option-adfs-with-asp-net-in-visual-studio-2013/ I am able to get needed information for user using simple code Dim UserEmail = System.Security.Claims.ClaimsPrincipal.Current.FindFirst(System.IdentityModel.Claims.ClaimTypes.Email).Value But how I can get user groups where the username belongs and check if user account is member of Windows group in Active Directory? I have tried to use System.Security.Claims.ClaimsPrincipal

Exclude specific path from WIF authorization in a ASP.NET MVC 4 project

坚强是说给别人听的谎言 提交于 2019-12-04 18:05:15
问题 We have successfully configured windows identity foundation (WIF) in our ASP.NET 4.5 MVC 4 project with the help of the Identity and Access... extension for Visual Studio 2012. But are unable to exclude a specific path from authorization to allow anonymous access. When we access our default route (i.e. /Home ), the passive redirection will redirect us to the configured issuer Uri. This is currect. But now assume we want to exclude Path /Guest from STS Authentication so that everybody can

Custom Authentication on Asp.Net 4.5 with WIF

那年仲夏 提交于 2019-12-04 17:24:24
I have an application set up with Azure ACS and .net 4.5 using claims. My application uses dropbox also. I was wondering if i could let users identify them self with dropbox alone. I get a token from dropbox when the user logs in with dropbox and a unique id. Where in the .net pipe do i tell it that i have authenticated a user, such the principals are set on the next request also. To make the example simple, lets say i have a form with two inputs. name,pass. If the name is 1234 and pass is 1234. then i would like to tell the asp.net pipeline that the user is authenticated. Is this possible? or

How to mix WIF and non-WIF endpoints in a single WCF <service>?

痴心易碎 提交于 2019-12-04 15:53:33
A WIF-based WCF service needs to call method FederatedServiceCredentials.ConfigureServiceHost() , or put the equivalent element <federatedServiceHostConfiguration> in the web.config file, to work. This is a setting on the service level, in other words it applies for all endpoints. According to the method documentation, the ServiceHostBase instance is modified in several WIF-specific ways. For example, the authorization is replaced by a WIF-based authorization class. Now I'd like to have a single <service> (inside <system.serviceModel><services> ) with multiple <endpoint> s, where one endpoint