Class UserLoginSuccessEvent
- Namespace
- Fdyay.IdentityServer.Events
- Assembly
- Fdyay.IdentityServer.Core.dll
A user signed in.
public class UserLoginSuccessEvent : Event
- Inheritance
-
UserLoginSuccessEvent
- Inherited Members
Remarks
Raised where a user is authenticated rather than wherever the sign-in cookie is written. Those are not the
same place: DefaultUserSession re-issues the cookie to persist the session id, and again for each
client the session authenticates, so a host that counted cookie writes would count one sign-in three times.
Constructors
UserLoginSuccessEvent(string, string, string?, string?, string?)
A user who signed in, locally or through an external provider.
public UserLoginSuccessEvent(string username, string subjectId, string? displayName = null, string? provider = null, string? providerSubjectId = null)
Parameters
usernamestringWhat the user typed, or the local account an external identity resolved to.
subjectIdstringThe local subject the session is for.
displayNamestringThe user's display name, where there is one.
providerstringThe external scheme, or null for a local sign-in.
providerSubjectIdstringThe subject as the external provider knows it, or null for a local sign-in.
Properties
ClientId
The application the sign-in was for, where one was waiting. Duende's.
public string? ClientId { get; set; }
Property Value
Remarks
The client id for an OpenID Connect request, the service provider's entity id for a SAML one.
DisplayName
The user's display name, where one was known.
public string? DisplayName { get; }
Property Value
Endpoint
Where the user signed in: UI, the sign-in pages, as Duende names an interactive sign-in.
public string? Endpoint { get; set; }
Property Value
Provider
The external scheme, or null when the user signed in here.
public string? Provider { get; }
Property Value
Remarks
Null rather than a placeholder such as "local". "Signed in here" and "signed in through someone else" are different facts, and a filler value makes a host querying for federated sign-ins match every row.
ProviderSubjectId
The subject as the external provider knows it — null for a local sign-in.
public string? ProviderSubjectId { get; }
Property Value
SubjectId
The local subject the session is for.
public string SubjectId { get; }
Property Value
Username
What the user typed, or the local account an external identity resolved to.
public string Username { get; }