Class ReactiveAuthorization


public class ReactiveAuthorization extends Object
A class for negotiating for a supported AuthenticationProvider based on the WWW-Authenticate headers received from a resource server.

In general, any authorization mechanism loaded via the ServiceLoader will be available for use during the challenge-response negotiation with a server. There are, however, certain known weak mechanisms such as Basic auth and Digest auth that are explicitly excluded.

  • Constructor Details

    • ReactiveAuthorization

      public ReactiveAuthorization()
      Create a new authorization handler, loading any AuthenticationProvider implementations via the ServiceLoader.

      Known weak authorization mechanisms such as Basic and Digest are explicitly omitted.

  • Method Details

    • negotiate

      public CompletionStage<Optional<Credential>> negotiate(Session session, Request request, Collection<Challenge> challenges)
      Negotiate for an authorization credential.
      session - the agent session
      request - the HTTP request
      challenges - the HTTP challenge schemes
      the next stage of completion, possibly containing a credential