Table of Contents

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

username string

What the user typed, or the local account an external identity resolved to.

subjectId string

The local subject the session is for.

displayName string

The user's display name, where there is one.

provider string

The external scheme, or null for a local sign-in.

providerSubjectId string

The 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

string

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

string

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

string

Provider

The external scheme, or null when the user signed in here.

public string? Provider { get; }

Property Value

string

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

string

SubjectId

The local subject the session is for.

public string SubjectId { get; }

Property Value

string

Username

What the user typed, or the local account an external identity resolved to.

public string Username { get; }

Property Value

string