Table of Contents

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

json string

The document, as JSON.

maxAge int?

The max-age in seconds: null or negative sends no Cache-Control header, zero sends no-store.

Exceptions

ArgumentNullException

json is null.

Properties

Json

The document, as JSON.

public string Json { get; }

Property Value

string

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

context HttpContext

The request whose response is written.

Returns

Task