Class CibaModel
- Namespace
- Fdyay.IdentityServer.UI.Pages
- Assembly
- Fdyay.IdentityServer.UI.dll
Where a user answers a client that asked to authenticate them while they were elsewhere.
[Authorize]
public class CibaModel : PageModel, IAsyncPageFilter, IPageFilter, IFilterMetadata
- Inheritance
-
CibaModel
- Implements
- Inherited Members
Remarks
The other end of the backchannel authentication endpoint, and the reason that endpoint is worth having. A CIBA request arrives with nobody in front of it, so without a screen that can list what is waiting for the person it names, the flow has no ending except expiry.
Two states, like the device page: a list of what is waiting, and one request opened for a decision. What it does not have is the device page's "type in a code" state, because there is no code — the request already knows whose it is, and this page shows a user only their own.
Constructors
CibaModel(IBackchannelAuthenticationInteractionService, IEventService)
Creates the page model, as the container resolves it.
public CibaModel(IBackchannelAuthenticationInteractionService interaction, IEventService events)
Parameters
interactionIBackchannelAuthenticationInteractionServiceLists this user's pending requests, opens one, and records the answer.
eventsIEventServiceReceives the ConsentGrantedEvent or ConsentDeniedEvent for a recorded answer.
Properties
Decided
Whether the user's answer was recorded on this post.
public bool Decided { get; }
Property Value
Granted
Whether the recorded answer granted at least one scope.
public bool Granted { get; }
Property Value
Input
The posted form: the request's id, which button was pressed, the ticked scopes and the grant's name.
[BindProperty]
public CibaModel.InputModel Input { get; set; }
Property Value
Pending
Everything waiting on this user, when no single request has been opened.
public IReadOnlyCollection<BackChannelAuthenticationRequestContext> Pending { get; }
Property Value
PendingRequest
The request being decided, once one has been opened.
public BackChannelAuthenticationRequestContext? PendingRequest { get; }
Property Value
RequestNotRecognised
Set when an id does not identify a live request of this user's, so the page can say so.
public bool RequestNotRecognised { get; }
Property Value
Scopes
What the page offers, one row per scope this request validated.
public IReadOnlyList<ConsentScope> Scopes { get; }
Property Value
Methods
OnGetAsync()
Lists every request waiting on the signed-in user, or — with an id in the query string — opens that one for a
decision.
public Task<IActionResult> OnGetAsync()
Returns
- Task<IActionResult>
The page.
OnPostAsync()
Opens the posted request and, when a button was pressed, records the answer: Allow with at least one scope ticked
grants those scopes; Deny, or Allow with nothing ticked, denies it with access_denied.
public Task<IActionResult> OnPostAsync()
Returns
- Task<IActionResult>
The page, showing the request or the outcome.