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 |
downloadPKICerts(String certsLocation)
Downloads required PKI certificates from Keystone server.
|
Map<String,Long> |
getRevokedTokens(String certsLocation)
Get latest revoked tokens from Keystone server.
|
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)
AuthenticationService
authenticate
in interface AuthenticationService
domain
- authentication domainuser
- user namepassword
- user passwordpublic Authentication validate(String token)
AuthenticationService
validate
in interface AuthenticationService
token
- token to be validatedAuthenticationService.authenticate(String, String, String)
public void invalidate(String token)
AuthenticationService
invalidate
in interface AuthenticationService
token
- token to be invalidatedpublic void downloadPKICerts(String certsLocation)
AuthenticationService
downloadPKICerts
in interface AuthenticationService
certsLocation
- PKI certificates pathpublic Map<String,Long> getRevokedTokens(String certsLocation)
AuthenticationService
getRevokedTokens
in interface AuthenticationService
certsLocation
- PKI certificates pathCopyright © 2015. All Rights Reserved.