public static class BasicAuthentication.BasicResult extends java.lang.Object implements Authentication.Result
Application may utilize this class directly via
org.eclipse.jetty.client.api.AuthenticationStore#addAuthenticationResult(Result)
to perform preemptive authentication, that is immediately
sending the authorization header based on the fact that the
URI is known to require authentication and that username
and password are known a priori.
Constructor and Description |
---|
BasicResult(java.net.URI uri,
HttpHeader header,
java.lang.String user,
java.lang.String password) |
BasicResult(java.net.URI uri,
java.lang.String user,
java.lang.String password) |
Modifier and Type | Method and Description |
---|---|
void |
apply(Request request)
Applies the authentication result to the given request.
|
java.net.URI |
getURI() |
java.lang.String |
toString() |
public BasicResult(java.net.URI uri, java.lang.String user, java.lang.String password)
public BasicResult(java.net.URI uri, HttpHeader header, java.lang.String user, java.lang.String password)
public java.net.URI getURI()
getURI
in interface Authentication.Result
Result
public void apply(Request request)
Authentication.Result
Authorization
header is added to the request, with the right information to
successfully authenticate at the server.apply
in interface Authentication.Result
request
- the request to authenticatepublic java.lang.String toString()
toString
in class java.lang.Object
Copyright © 1995–2023 Webtide. All rights reserved.