public interface Authentication
Authenticationrepresents a mechanism to authenticate requests for protected resources.
Authentications are added to an
AuthenticationStore, which is then
queried to find the right
Authentication mechanism to use based on its type, URI and realm, as returned by
WWW-Authenticate response headers.
Authentication mechanism is found, it is then
executed for the given request,
Authentication.Result, which is then stored in the
so that subsequent requests can be preemptively authenticated.
|Modifier and Type||Interface||Description|
Structure holding information about the
|Modifier and Type||Field||Description|
Constant used to indicate that any realm will match.
|Modifier and Type||Method||Description|
boolean matches(java.lang.String type, java.net.URI uri, java.lang.String realm)
Authentications based on the given parameters
Authenticationtype such as "Basic" or "Digest"
uri- the request URI
realm- the authentication realm as provided in the
Authentication.Result authenticate(Request request, ContentResponse response, Authentication.HeaderInfo headerInfo, Attributes context)
Authentication.Resultthat can be used to actually authenticate the request via
If a request for
"/secure" returns a
Authentication.Result, then the result may be used for other
requests such as
"/secure/bar", unless those resources are protected
by other realms.
request- the request to execute the authentication mechanism for
response- the 401 response obtained in the previous attempt to request the protected resource
Proxy-Authenticate) header chosen for this authentication (among the many that the response may contain)
context- the conversation context in case the authentication needs multiple exchanges to be completed and information needs to be stored across exchanges
Copyright © 1995–2018 Webtide. All rights reserved.