public class HttpAuthClient extends Object implements AuthenticationClient
AuthenticationClient adapter for HTTP.| Constructor and Description |
|---|
HttpAuthClient(org.apache.http.client.HttpClient client,
String adminToken,
URI uri)
Creates a client that uses HTTP to authenticate a token.
|
| Modifier and Type | Method and Description |
|---|---|
Authentication |
authenticate(String domain,
String user,
String password)
Authenticate against the specified domain using the supplied user name
and password.
|
void |
invalidate(String token)
Invalidates the specified authentication token.
|
Authentication |
validate(String token)
Determines whether the specified authentication token is valid and if
so, provides the associated authentication data.
|
public HttpAuthClient(org.apache.http.client.HttpClient client,
String adminToken,
URI uri)
client - HTTP client to be usedadminToken - admin token to be used for validating other tokensuri - base authentication service URIpublic Authentication authenticate(String domain, String user, String password)
AuthenticationServiceauthenticate in interface AuthenticationServicedomain - authentication domainuser - user namepassword - user passwordpublic Authentication validate(String token)
AuthenticationServicevalidate in interface AuthenticationServicetoken - token to be validatedAuthenticationService.authenticate(String, String, String)public void invalidate(String token)
AuthenticationServiceinvalidate in interface AuthenticationServicetoken - token to be invalidatedCopyright © 2014. All Rights Reserved.