The Duende.BFF.BffOptions allows to configure several aspects of the BFF framework.
You set the options at startup time in your ConfigureServices method:
// configure options here..
Enables checks in the user management endpoints that ensure that the BFF middleware has been added to the pipeline. Since the middleware performs important security checks, this protects from accidental configuration errors. You can disable this check if it interferes with some custom logic you might have. Defaults to true.
This sets the license key for Duende.BFF. A business edition or higher license key is required for production deployments. The same license key is used in IdentityServer and the BFF. Just as in the IdentityServer host, you can either set the license key using this option in code or include Duende_License.key in the same directory as your BFF host.
AnonymousSessionResponse (added in 2.0)
This sets the response status code behavior on the user endpoint to either return 401 or 200 with a null payload when the user is anonymous.
The ASP.NET environment names that enable the diagnostics endpoint. Defaults to “Development”.
Sets the path to the login endpoint. Defaults to /bff/login.
Sets the path to the silent login endpoint. Defaults to /bff/silent-login.
Sets the path to the silent login callback endpoint. Defaults to /bff/silent-login-callback.
Sets the path to the logout endpoint. Defaults to /bff/logout.
Sets the path to the user endpoint. Defaults to /bff/user.
Sets the path to the backchannel logout endpoint. Defaults to /bff/backchannel.
Sets the path to the diagnostics endpoint. Defaults to /bff/diagnostics.
Base path for management endpoints. Defaults to /bff.
Flag that specifies if the sid claim needs to be present in the logout request as query string parameter. Used to prevent cross site request forgery. Defaults to true.
Specifies if the user’s refresh token is automatically revoked at logout time. Defaults to true.
Specifies if during backchannel logout all matching user sessions are logged out. If true, all sessions for the subject will be revoked. If false, just the specific session will be revoked. Defaults to false.
Indicates if expired server side sessions should be cleaned up. This requires an implementation of IUserSessionStoreCleanup to be registered in the DI system. Defaults to false.
Interval at which expired sessions are cleaned up. Defaults to 10 minutes.
Specifies the name of the header used for anti-forgery header protection. Defaults to X-CSRF.
Specifies the expected value of Anti-forgery header. Defaults to 1.
Specifies the Json Web Key to use when creating DPoP proof tokens. Defaults to null, which is appropriate when not using DPoP.