You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`AddAspNetIdentity` requires as a generic parameter the class that models your user for ASP.NET Identity (and the same one passed to `AddIdentity` to configure ASP.NET Identity).
39
-
This configures IdentityServer to use the ASP.NET Identity implementations of [IUserClaimsPrincipalFactory](https://docs.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.identity.iuserclaimsprincipalfactory-1) to convert the user data into claims, `IResourceOwnerPasswordValidator` to support the [password grant type](/identityserver/tokens/password-grant/), and `IProfileService` which uses the `IUserClaimsPrincipalFactory` to add [claims](/identityserver/fundamentals/claims) to tokens.
40
-
It also configures some of ASP.NET Identity's options for use with IdentityServer (such as claim types to use and authentication cookie settings).
40
+
`AddAspNetIdentity` requires as a generic parameter the class that models your user for ASP.NET Identity (and the same
41
+
one passed to `AddIdentity` to configure ASP.NET Identity).
42
+
This configures IdentityServer to use the ASP.NET Identity implementations
43
+
of [IUserClaimsPrincipalFactory](https://docs.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.identity.iuserclaimsprincipalfactory-1)
44
+
to convert the user data into claims, `IResourceOwnerPasswordValidator` to support
45
+
the [password grant type](/identityserver/tokens/password-grant/), and `IProfileService`, which uses the
46
+
`IUserClaimsPrincipalFactory` to add [claims](/identityserver/fundamentals/claims) to tokens.
47
+
It also configures some of ASP.NET Identity's options for use with IdentityServer (such as claim types to use and
48
+
authentication cookie settings).
41
49
42
-
If you need to use your own implementation of `IUserClaimsPrincipalFactory`, then that is supported. Our implementation of the `IUserClaimsPrincipalFactory` will use the decorator pattern to encapsulate yours. For this to work properly, ensure that your implementation is registered in the ASP.NET Core service provider prior to calling the IdentityServer `AddAspNetIdentity` extension method.
50
+
If you need to use your own implementation of `IUserClaimsPrincipalFactory`, then that is supported. Our implementation
51
+
of the `IUserClaimsPrincipalFactory` will use the decorator pattern to encapsulate yours. For this to work correctly,
52
+
ensure that your implementation is registered in the ASP.NET Core service provider before calling the IdentityServer
53
+
`AddAspNetIdentity` extension method.
43
54
44
-
The `IUserProfileService` interface has two methods that IdentityServer uses to interact with the user store. The profile service added for ASP.NET Identity implements `GetProfileDataAsync` by invoking the `IUserClaimsPrincipalFactory` implementation registered in the dependency injection container. The other method on `IProfileService` is `IsActiveAsync` which is used in various places in IdentityServer to validate that the user is (still) active. There is no built-in concept in ASP.NET Identity to inactive users, so our implementation is hard coded to return `true`. If you extend the ASP.NET Identity user with enabled/disabled functionality you should derive from our `ProfileService<TUser>` and override *IsUserActiveAsync(TUser user)* to check your custom enabled/disabled flags.
55
+
The `IUserProfileService` interface has two methods that IdentityServer uses to interact with the user store. The
56
+
profile service added for ASP.NET Identity implements `GetProfileDataAsync` by invoking the
57
+
`IUserClaimsPrincipalFactory` implementation registered in the dependency injection container. The other method on
58
+
`IProfileService` is `IsActiveAsync`, which is used in various places in IdentityServer to validate that the user is (
59
+
still) active. There is no built-in concept in ASP.NET Identity to inactive users, so our implementation is hard-coded
60
+
to return `true`. If you extend the ASP.NET Identity user with enabled/disabled functionality, you should derive from
61
+
our `ProfileService<TUser>` and override `IsUserActiveAsync(TUser user)` to check your custom enabled/disabled flags.
45
62
46
63
## Template
47
-
Alternatively, you can use the `isaspid`[template](/identityserver/overview/packaging#templates) to create a starter IdentityServer host project configured to use ASP.NET Identity. See the [Quickstart Documentation](/identityserver/quickstarts/5-aspnetid/) for a detailed walkthrough.
64
+
65
+
Alternatively, you can use the `isaspid`[template](/identityserver/overview/packaging#templates) to create a starter
66
+
IdentityServer host project configured to use ASP.NET Identity. See
67
+
the [Quickstart Documentation](/identityserver/quickstarts/5-aspnetid/) for a detailed walkthrough.
0 commit comments