Package com.inrupt.client.auth
Class ReactiveAuthorization
java.lang.Object
com.inrupt.client.auth.ReactiveAuthorization
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 Summary
ConstructorDescriptionCreate a new authorization handler, loading anyAuthenticationProvider
implementations via theServiceLoader
. -
Method Summary
Modifier and TypeMethodDescriptionnegotiate
(Session session, Request request, Collection<Challenge> challenges) Negotiate for an authorization credential.
-
Constructor Details
-
ReactiveAuthorization
public ReactiveAuthorization()Create a new authorization handler, loading anyAuthenticationProvider
implementations via theServiceLoader
.Known weak authorization mechanisms such as
Basic
andDigest
are explicitly omitted.
-
-
Method Details
-
negotiate
public CompletionStage<Optional<Credential>> negotiate(Session session, Request request, Collection<Challenge> challenges) Negotiate for an authorization credential.- Parameters:
session
- the agent sessionrequest
- the HTTP requestchallenges
- the HTTP challenge schemes- Returns:
- the next stage of completion, possibly containing a credential
-