Class ConsentGrantedEvent
- Namespace
- Fdyay.IdentityServer.Events
- Assembly
- Fdyay.IdentityServer.Core.dll
A user agreed to give a client the scopes it asked for, or some of them.
public class ConsentGrantedEvent : Event
- Inheritance
-
ConsentGrantedEvent
- Inherited Members
Remarks
Raised by every screen that asks a person to approve scopes — the consent page, the device page and the CIBA page. There are three, and a rule applied to the first one leaves the other two behaving differently with nothing to notice it: that is what backlog item 2b cost when the six ignored consent members were fixed on one screen and stayed half-closed for seven releases.
Scopes is what the user actually granted, never what the client asked for. Those differ whenever somebody unticks a box, and an event carrying the request would tell a host that a user agreed to something they declined — a worse record than none.
Constructors
ConsentGrantedEvent(string, string, IEnumerable<string>, bool)
A user's approval of some or all of what a client asked for.
public ConsentGrantedEvent(string subjectId, string clientId, IEnumerable<string> scopes, bool remembered)
Parameters
subjectIdstringThe user who approved.
clientIdstringThe client approved.
scopesIEnumerable<string>What the user granted, which is not always what was requested.
rememberedboolWhether the decision was stored as a standing permission.
Properties
ClientId
The client approved.
public string ClientId { get; }
Property Value
Remembered
Whether the decision was stored rather than made once.
public bool Remembered { get; }
Property Value
Remarks
The difference between an answer to this request and a standing permission the user will not be asked about again, which is the part of a consent record somebody comes back to.
RequestedScopes
What the client asked for, beside what was granted in Scopes. Duende's.
public IEnumerable<string>? RequestedScopes { get; set; }
Property Value
Scopes
What was granted, which is not always what was requested.
public IReadOnlyCollection<string> Scopes { get; }
Property Value
SubjectId
The user who approved.
public string SubjectId { get; }