Show / Hide Table of Contents

Class OpenIddictServerAspNetCoreBuilder

Exposes the necessary methods required to configure the OpenIddict server ASP.NET Core integration.

Inheritance
System.Object
OpenIddictServerAspNetCoreBuilder
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: Microsoft.Extensions.DependencyInjection
Assembly: cs.temp.dll.dll
Syntax
public class OpenIddictServerAspNetCoreBuilder

Constructors

OpenIddictServerAspNetCoreBuilder(IServiceCollection)

Initializes a new instance of OpenIddictServerAspNetCoreBuilder.

Declaration
public OpenIddictServerAspNetCoreBuilder(IServiceCollection services)
Parameters
Type Name Description
IServiceCollection services

The services collection.

Properties

Services

Gets the services collection.

Declaration
public IServiceCollection Services { get; }
Property Value
Type Description
IServiceCollection

Methods

Configure(Action<OpenIddictServerAspNetCoreOptions>)

Amends the default OpenIddict server ASP.NET Core configuration.

Declaration
public OpenIddictServerAspNetCoreBuilder Configure(Action<OpenIddictServerAspNetCoreOptions> configuration)
Parameters
Type Name Description
Action<OpenIddictServerAspNetCoreOptions> configuration

The delegate used to configure the OpenIddict options.

Returns
Type Description
OpenIddictServerAspNetCoreBuilder

The OpenIddictServerAspNetCoreBuilder.

Remarks

This extension can be safely called multiple times.

DisableTransportSecurityRequirement()

Disables the transport security requirement (HTTPS).

Declaration
public OpenIddictServerAspNetCoreBuilder DisableTransportSecurityRequirement()
Returns
Type Description
OpenIddictServerAspNetCoreBuilder

The OpenIddictServerAspNetCoreBuilder.

EnableAuthorizationEndpointPassthrough()

Enables the pass-through mode for the OpenID Connect authorization endpoint. When the pass-through mode is used, OpenID Connect requests are initially handled by OpenIddict. Once validated, the rest of the request processing pipeline is invoked, so that OpenID Connect requests can be handled at a later stage (in a custom middleware or in a MVC controller, for instance).

Declaration
public OpenIddictServerAspNetCoreBuilder EnableAuthorizationEndpointPassthrough()
Returns
Type Description
OpenIddictServerAspNetCoreBuilder

The OpenIddictServerAspNetCoreBuilder.

EnableAuthorizationRequestCaching()

Enables authorization request caching, so that authorization requests are automatically stored in the distributed cache, which allows flowing large payloads across requests. Enabling this option is recommended when using external authentication providers or when large GET or POST OpenID Connect authorization requests support is required.

Declaration
public OpenIddictServerAspNetCoreBuilder EnableAuthorizationRequestCaching()
Returns
Type Description
OpenIddictServerAspNetCoreBuilder

The OpenIddictServerAspNetCoreBuilder.

EnableErrorPassthrough()

Enables error pass-through support, so that the rest of the request processing pipeline is automatically invoked when returning an error from the interactive authorization and logout endpoints. When this option is enabled, special logic must be added to these actions to handle errors, that can be retrieved using .

Declaration
public OpenIddictServerAspNetCoreBuilder EnableErrorPassthrough()
Returns
Type Description
OpenIddictServerAspNetCoreBuilder

The OpenIddictServerAspNetCoreBuilder.

Remarks

Important: the error pass-through mode cannot be used when the status code pages integration is enabled.

EnableLogoutEndpointPassthrough()

Enables the pass-through mode for the OpenID Connect logout endpoint. When the pass-through mode is used, OpenID Connect requests are initially handled by OpenIddict. Once validated, the rest of the request processing pipeline is invoked, so that OpenID Connect requests can be handled at a later stage (in a custom middleware or in a MVC controller, for instance).

Declaration
public OpenIddictServerAspNetCoreBuilder EnableLogoutEndpointPassthrough()
Returns
Type Description
OpenIddictServerAspNetCoreBuilder

The OpenIddictServerAspNetCoreBuilder.

EnableLogoutRequestCaching()

Enables logout request caching, so that logout requests are automatically stored in the distributed cache.

Declaration
public OpenIddictServerAspNetCoreBuilder EnableLogoutRequestCaching()
Returns
Type Description
OpenIddictServerAspNetCoreBuilder

The OpenIddictServerAspNetCoreBuilder.

EnableStatusCodePagesIntegration()

Enables status code pages integration support. Once enabled, errors generated by the interactive endpoints can be handled by ASP.NET Core.

Declaration
public OpenIddictServerAspNetCoreBuilder EnableStatusCodePagesIntegration()
Returns
Type Description
OpenIddictServerAspNetCoreBuilder

The OpenIddictServerAspNetCoreBuilder.

EnableTokenEndpointPassthrough()

Enables the pass-through mode for the OpenID Connect token endpoint. When the pass-through mode is used, OpenID Connect requests are initially handled by OpenIddict. Once validated, the rest of the request processing pipeline is invoked, so that OpenID Connect requests can be handled at a later stage (in a custom middleware or in a MVC controller, for instance).

Declaration
public OpenIddictServerAspNetCoreBuilder EnableTokenEndpointPassthrough()
Returns
Type Description
OpenIddictServerAspNetCoreBuilder

The OpenIddictServerAspNetCoreBuilder.

EnableUserinfoEndpointPassthrough()

Enables the pass-through mode for the OpenID Connect userinfo endpoint. When the pass-through mode is used, OpenID Connect requests are initially handled by OpenIddict. Once validated, the rest of the request processing pipeline is invoked, so that OpenID Connect requests can be handled at a later stage (in a custom middleware or in a MVC controller, for instance).

Declaration
public OpenIddictServerAspNetCoreBuilder EnableUserinfoEndpointPassthrough()
Returns
Type Description
OpenIddictServerAspNetCoreBuilder

The OpenIddictServerAspNetCoreBuilder.

EnableVerificationEndpointPassthrough()

Enables the pass-through mode for the OpenID Connect user verification endpoint. When the pass-through mode is used, OpenID Connect requests are initially handled by OpenIddict. Once validated, the rest of the request processing pipeline is invoked, so that OpenID Connect requests can be handled at a later stage (in a custom middleware or in a MVC controller, for instance).

Declaration
public OpenIddictServerAspNetCoreBuilder EnableVerificationEndpointPassthrough()
Returns
Type Description
OpenIddictServerAspNetCoreBuilder

The OpenIddictServerAspNetCoreBuilder.

Equals(Object)

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
System.Object obj
Returns
Type Description
System.Boolean
Overrides
System.Object.Equals(System.Object)

GetHashCode()

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32
Overrides
System.Object.GetHashCode()

SetAuthorizationRequestCachingPolicy(DistributedCacheEntryOptions)

Sets the caching policy used by the authorization endpoint. Note: the specified policy is only used when caching is explicitly enabled.

Declaration
public OpenIddictServerAspNetCoreBuilder SetAuthorizationRequestCachingPolicy(DistributedCacheEntryOptions policy)
Parameters
Type Name Description
DistributedCacheEntryOptions policy

The caching policy.

Returns
Type Description
OpenIddictServerAspNetCoreBuilder

The OpenIddictServerAspNetCoreBuilder.

SetLogoutRequestCachingPolicy(DistributedCacheEntryOptions)

Sets the caching policy used by the logout endpoint. Note: the specified policy is only used when caching is explicitly enabled.

Declaration
public OpenIddictServerAspNetCoreBuilder SetLogoutRequestCachingPolicy(DistributedCacheEntryOptions policy)
Parameters
Type Name Description
DistributedCacheEntryOptions policy

The caching policy.

Returns
Type Description
OpenIddictServerAspNetCoreBuilder

The OpenIddictServerAspNetCoreBuilder.

SetRealm(String)

Sets the realm returned to the caller as part of the WWW-Authenticate header.

Declaration
public OpenIddictServerAspNetCoreBuilder SetRealm(string realm)
Parameters
Type Name Description
System.String realm

The issuer address.

Returns
Type Description
OpenIddictServerAspNetCoreBuilder

The OpenIddictServerAspNetCoreBuilder.

ToString()

Declaration
public override string ToString()
Returns
Type Description
System.String
Overrides
System.Object.ToString()
In This Article
Back to top Generated by DocFX