Exemplo n.º 1
0
        public void Configure(string name, OpenIddictServerAspNetCoreOptions options)
        {
            // Note: the OpenID module handles the authorization, logout, token and userinfo requests
            // in its dedicated ASP.NET Core MVC controller, which requires enabling the pass-through mode.
            options.EnableAuthorizationEndpointPassthrough = true;
            options.EnableLogoutEndpointPassthrough        = true;
            options.EnableTokenEndpointPassthrough         = true;
            options.EnableUserinfoEndpointPassthrough      = true;

            // Note: caching is enabled for both the authorization and logout endpoints to allow sending
            // large POST authorization and logout requests, but can be programmatically disabled, as the
            // authorization and logout views support flowing the entire payload and not just the request_id.
            options.EnableAuthorizationEndpointCaching = true;
            options.EnableLogoutEndpointCaching        = true;

            // Note: error pass-through is enabled to allow the actions of the MVC authorization controller
            // to handle the errors returned by the interactive endpoints without relying on the generic
            // status code pages middleware to rewrite the response later in the request processing.
            options.EnableErrorPassthrough = true;

            // Note: in Orchard, transport security is usually configured via the dedicated HTTPS module.
            // To make configuration easier and avoid having to configure it in two different features,
            // the transport security requirement enforced by OpenIddict by default is always turned off.
            options.DisableTransportSecurityRequirement = true;
        }
 public void Configure(OpenIddictServerAspNetCoreOptions options)
 => Debug.Fail("This infrastructure method shouldn't be called.");