Class AspNetIdentityExtensions
- Namespace
- Microsoft.Extensions.DependencyInjection
- Assembly
- Fdyay.IdentityServer.AspNetIdentity.dll
Makes ASP.NET Core Identity this server's user store and session.
public static class AspNetIdentityExtensions
- Inheritance
-
AspNetIdentityExtensions
- Inherited Members
Methods
AddAspNetIdentity<TUser>(IIdentityServerBuilder)
Uses ASP.NET Core Identity's users for this server's claims and its cookie for this server's session.
public static IIdentityServerBuilder AddAspNetIdentity<TUser>(this IIdentityServerBuilder builder) where TUser : class
Parameters
builderIIdentityServerBuilder
Returns
Type Parameters
TUser
Remarks
Duende 8.0.1's AddAspNetIdentity<TUser>, measured, and called the same way — after AddIdentity,
whose claims factory it decorates:
- Identity's claim types become the protocol's:
sub,name,role,email. - ProfileService<TUser> issues a user's claims and answers whether the user is active.
- A principal Identity refreshes from the security stamp keeps this server's session claims.
- Identity's cookies are essential and its application and external cookies
SameSite=None, as this server's own are, so a sign-in survives the cross-site redirects a protocol makes. - Where this server's cookie was the default scheme, Identity's becomes it — and so this server's session — and a dynamic provider's sign-out ends that session unless a host named another.
The shipped sign-in pages sign Identity's users in, through SignInManager<TUser>, from 0.112.0. Duende also registers a resource owner password validator; the password grant is not one this server has.