Interface IUserSignInService
- Namespace
- Fdyay.IdentityServer.Services
- Assembly
- Fdyay.IdentityServer.AspNetCore.dll
Signs a user in to this server's session against whichever accounts the host keeps.
public interface IUserSignInService
Remarks
Ours, not Duende's: Duende ships its sign-in pages as templates, one written against its test users and another
against ASP.NET Core Identity, and a host picks one and edits it. The pages here are a package, so the choice is a
service instead. The shipped default signs in against the test users, as the pages always did;
AddAspNetIdentity<TUser> replaces it with one that signs in through SignInManager<TUser>, so the
same pages sign Identity's users in. A host with accounts of another kind implements this and registers it.
Both methods sign in or refuse; neither redirects, raises an event or renders anything, which stay the page's — so a refusal reads the same to a user whatever the accounts are, and the page records it the same way.
Methods
SignInExternalAsync(HttpContext, ExternalUserSignIn, CancellationToken)
Finds — or provisions — the local user an external provider's identity belongs to, and signs them in.
Task<UserSignInResult> SignInExternalAsync(HttpContext context, ExternalUserSignIn external, CancellationToken cancellationToken = default)
Parameters
contextHttpContextexternalExternalUserSignIncancellationTokenCancellationToken
Returns
SignInWithPasswordAsync(HttpContext, string, string, CancellationToken)
Checks a username and password and, if they are right, signs the user in.
Task<UserSignInResult> SignInWithPasswordAsync(HttpContext context, string username, string password, CancellationToken cancellationToken = default)
Parameters
contextHttpContextusernamestringpasswordstringcancellationTokenCancellationToken