asp.net-identity

Use External Access Token or Local Access Token

此生再无相见时 提交于 2020-01-11 19:57:35
问题 I am developing an application using ASP.NET MVC 5.2.2, Web API 2.2 and Katana/OWIN 3.0 . The application uses ASP.NET Identity 2.1 for local accounts and database. I am using OAuth Authorization Server to generate access and refresh token. I have Android and IOS apps which uses my local oauth authorization server. Android and IOS apps uses SDK to login with Facebook, Google, etc. After that the apps will send the (Facebook/Google/etc) access token to the server. The server will validate

Use External Access Token or Local Access Token

爱⌒轻易说出口 提交于 2020-01-11 19:56:32
问题 I am developing an application using ASP.NET MVC 5.2.2, Web API 2.2 and Katana/OWIN 3.0 . The application uses ASP.NET Identity 2.1 for local accounts and database. I am using OAuth Authorization Server to generate access and refresh token. I have Android and IOS apps which uses my local oauth authorization server. Android and IOS apps uses SDK to login with Facebook, Google, etc. After that the apps will send the (Facebook/Google/etc) access token to the server. The server will validate

ASP.NET Identity's UserManager caches users?

[亡魂溺海] 提交于 2020-01-11 09:12:48
问题 We're using ASP.NET Identity 2.2 with ASP.NET MVC 5.2, Entity Framework 6.2 and Unity 5.7. We have a class, ConnectUserManager , that derives from ASP.NET Identity's UserManager . A newly constructed UserStore is passed to UserManager every time. The lifetime of ConnectUserManager (and thus of UserManager ) is per request: Container.RegisterType<ConnectUserManager>( new PerRequestLifetimeManager(), new InjectionConstructor( Container.Resolve<ConnectDbContext>(), Container.Resolve

Asp.net Identity 2.0 extend UserValidator with custom unique property

馋奶兔 提交于 2020-01-11 08:53:13
问题 I would like to extend UserValidator or something similar in Asp.net Identity 2.0 to not only check for unique email but also a unique value of my choosing. Example of what I would like to do with Alias below. Is this possible or do I have to write a check everywhere I can update Alias? public class ApplicationUserManager : UserManager<ApplicationUser, int> { public ApplicationUserManager(IUserStore<ApplicationUser, int> store) : base(store) { this.UserValidator = new UserValidator

Implicit grant SPA with identity server4 concurrent login

瘦欲@ 提交于 2020-01-11 07:48:06
问题 how to restrict x amount of login on each client app in specific the SPA client with grant type - implicit This is out of scope within Identity server Solutions tried - Access tokens persisted to DB, however this approach the client kept updating the access token without coming to code because the client browser request is coming with a valid token though its expired the silent authentication is renewing the token by issues a new reference token ( that can be seen in the table persistGrants

Where is the site.css file located for Identity?

那年仲夏 提交于 2020-01-11 07:25:17
问题 I have an asp.net core 2.1 MVC application. I have ran the Scaffold Identity which has generated all the HTML and models used. I can't however find the css file that identity is using for its layouts? In chrome developer tools it tells me site.css is being loaded from /Identity/css/site.css and bootstrap is being loaded from /Identity/lib/bootstrap/dist/css/bootstrap.css . These files don't seem to exist anywhere in my project. Am I missing something? It's not using the site.css file that's

Using ASP.NET Identity on MVC 5 project but httpcontext User.ProviderName is “AspNetSqlRoleProvider”

情到浓时终转凉″ 提交于 2020-01-11 05:45:08
问题 I have a MVC 5 project using ASP.NET Identity (Invidual user account). As Database ORM I am using Entity framework 6 and IoC is taken care by Ninject. Solution structure is following MVC project -- has my controllers, views and ninject setup. For Ninject I got Ninject.MVC3 from nuget. Data project --- has my DataContext (IdentityDbContext) and my ApplicationUser (IdentityUser). My Data services and all repositories Core project -- has all my entities and interfaces [Authorize] attribute works

ASP.NET Core Identity for multiple project with IdentityServer4

て烟熏妆下的殇ゞ 提交于 2020-01-10 05:49:05
问题 I have one solution with two MVC projects, which use the IdentityServer4. In one project I installed the IdentityServer4 and have full access to the database. The other project is an MVC client. When I set the [Authorize] attribute on both project all works fine, but this role attribute [Authorize(Roles = "user")] works only in project one that has the IdentityServer4, the MVC client says: Unable to resolve service for type 'Microsoft.AspNetCore.Identity.UserManager`1[Entities.Application

Getting All Users and All Roles through asp.net Identity

无人久伴 提交于 2020-01-10 03:37:04
问题 I have a new project i created in VS 2013. I am using the identity system and i'm confused how to get a list of all users to the application and all roles int he application. I am trying to create some admin pages so i can add new roles, add roles to users, see who all is logged in or locked. Anybody know how to do this? 回答1: In ASP.NET Identity 1.0, you'll have to get this from the DbContext itself... var context = new ApplicationDbContext(); var allUsers = context.Users.ToList(); var

How to set password rules for ASP.NET identity?

亡梦爱人 提交于 2020-01-09 13:10:06
问题 In my ASP.NET applications I have following settings in DefaultMembershipProvider and SqlMembershipProvider in web.config: enablePasswordRetrieval="true" passwordFormat="Clear" requiresQuestionAndAnswer="false" They are required for Digest authentication. I would like to move to ASP.NET Identity. I am using automated tool to update all web.config files that I manage. How do I set these settings for ASP.NET Identity in the project generated by Visual Studio 2013? 回答1: You need to provide