Class RequestObjectResult
- Namespace
- Fdyay.IdentityServer.Validation
- Assembly
- Fdyay.IdentityServer.AspNetCore.dll
The outcome of resolving a JAR request object into authorization request parameters.
public sealed class RequestObjectResult
- Inheritance
-
RequestObjectResult
- Inherited Members
Properties
Error
The error code to return to the client, or null when the request may proceed.
public string? Error { get; init; }
Property Value
IsError
Whether Error is set.
public bool IsError { get; }
Property Value
Parameters
The parameters the rest of the pipeline should read.
public Dictionary<string, string> Parameters { get; init; }
Property Value
RequestObjectValues
The claims of the request object's payload, as they were signed — Duende's RequestObjectValues.
public IReadOnlyList<Claim> RequestObjectValues { get; init; }
Property Value
Remarks
What the authorize request validator hands on as RequestObjectValues: the
request's claims, less those that belong to the JWT rather than the request (iss, aud, exp and the
rest), one claim per value, so an array is several where Values holds each name once.
ResolvedByReference
Whether the object was fetched from a URL rather than carried in the request.
public bool ResolvedByReference { get; init; }
Property Value
Remarks
The caller needs to know because a fetch is expensive and repeatable in a way that reading a query parameter is not: the same return URL is resolved again at every interactive page, and each resolution would fetch again. It says how the object arrived, not whether it was trusted — an object is verified identically either way.
Values
Just the values the request object carried, for a UI that wants to show what was signed.
public Dictionary<string, string> Values { get; init; }
Property Value
Remarks
Empty when the request carried no object, which is not the same as an object carrying nothing.
Methods
Failure(string)
A refusal with error.
public static RequestObjectResult Failure(string error)
Parameters
errorstringThe error code to return to the client.
Returns
- RequestObjectResult
An error result.
Fetched(RequestObjectResult)
resolved, marked as fetched from a URL (ResolvedByReference).
public static RequestObjectResult Fetched(RequestObjectResult resolved)
Parameters
resolvedRequestObjectResultThe result of reading the fetched object.
Returns
- RequestObjectResult
A copy of its parameters and values, with ResolvedByReference set.
Success(Dictionary<string, string>, Dictionary<string, string>?)
The parameters to proceed with, and the values the request object carried.
public static RequestObjectResult Success(Dictionary<string, string> parameters, Dictionary<string, string>? values = null)
Parameters
parametersDictionary<string, string>The parameters the rest of the pipeline should read.
valuesDictionary<string, string>The values the request object carried; null for none.
Returns
- RequestObjectResult
A result that is not an error.