Class DiscoveryDocumentResult
- Namespace
- Fdyay.IdentityServer.Hosting
- Assembly
- Fdyay.IdentityServer.AspNetCore.dll
Writes the discovery document or the key set, with the Cache-Control header
ResponseCacheInterval asks for.
public sealed class DiscoveryDocumentResult : IEndpointResult
- Inheritance
-
DiscoveryDocumentResult
- Implements
- Inherited Members
Remarks
Duende 8.0.1's DiscoveryDocumentResult and JsonWebKeysResult writers, measured: no header without a
MaxAge, no-store for zero, max-age with Vary: Origin above it, and nothing for a negative
one. Ours: one result for both documents, holding the JSON already serialized, which is what the document cache stores.
Constructors
DiscoveryDocumentResult(string, int?)
Holds a document already serialized, to be written with the caching maxAge asks for.
public DiscoveryDocumentResult(string json, int? maxAge)
Parameters
jsonstringThe document, as JSON.
maxAgeint?The
max-agein seconds: null or negative sends noCache-Controlheader, zero sendsno-store.
Exceptions
- ArgumentNullException
jsonis null.
Properties
Json
The document, as JSON.
public string Json { get; }
Property Value
MaxAge
The max-age the response is sent with, in seconds; null sends no Cache-Control header.
public int? MaxAge { get; }
Property Value
- int?
Methods
ExecuteAsync(HttpContext)
Writes the result to the response.
public Task ExecuteAsync(HttpContext context)
Parameters
contextHttpContextThe request whose response is written.