T - the type of the PluginConfiguration for this AsyncRuleInterceptorpublic interface AsyncRuleInterceptor<T extends PluginConfiguration> extends Interceptor, DescribesUIConfigurable, ConfigurablePlugin<T>
AsyncRuleInterceptor is the runtime instantiation of a Rule defined in the Administrative API that
supports applying access control logic as an asynchronous computation. See the documentation of
RuleInterceptor for information on implementing a Rule.
AsyncRuleInterceptor should only be used when the logic of the Rule requires using a HttpClient. If a
HttpClient is not required, RuleInterceptor should be implemented instead.RuleInterceptor| Modifier and Type | Method and Description |
|---|---|
ErrorHandlingCallback |
getErrorHandlingCallback()
Provides an instance of
ErrorHandlingCallback that renders errors if the
AsyncRuleInterceptor is selected to render errors. |
CompletionStage<Outcome> |
handleRequest(Exchange exchange)
Invoked to allow a
AsyncRuleInterceptor to allow or deny further processing of a request. |
CompletionStage<Void> |
handleResponse(Exchange exchange)
Invoked to allow a
AsyncRuleInterceptor to handle the response attached to the
Exchange. |
getConfigurationFieldsconfigure, getConfigurationErrorHandlingCallback getErrorHandlingCallback()
ErrorHandlingCallback that renders errors if the
AsyncRuleInterceptor is selected to render errors.ErrorHandlingCallbackCompletionStage<Outcome> handleRequest(Exchange exchange)
AsyncRuleInterceptor to allow or deny further processing of a request.exchange - the current Exchange being processedCompletionStage representing the AsyncRuleInterceptor's policy decision. An
exceptionally completed CompletionStage will terminate processing of the current
Exchange and invoke PingAccess' generic error handling mechanism. As a result, implementations
of this method should not return an exceptionally completed CompletionStage to indicate the Rule
denied access. Instead, any expected errors that indicate a denial should be translated to a
CompletionStage completed with an Outcome.RETURN.CompletionStage<Void> handleResponse(Exchange exchange)
AsyncRuleInterceptor to handle the response attached to the
Exchange.exchange - the current Exchange being processedCompletionStage representing the asynchronous completion of the method. If this method does
not require use of a HttpClient, the logic of the method can be performed synchronously and
then return a completed CompletionStage with code like:
CompletableFuture.completedFuture(null)
Copyright 2023 Ping Identity Corp. All rights reserved.