Class DefaultAuthenticationService
- java.lang.Object
-
- org.forgerock.openig.tools.authentication.chf.DefaultAuthenticationService
-
- All Implemented Interfaces:
AuthenticationService
- Direct Known Subclasses:
AgentAuthenticationService
public class DefaultAuthenticationService extends Object implements AuthenticationService
Implements an HTTP-based authentication service.
-
-
Constructor Summary
Constructors Constructor Description DefaultAuthenticationService(Handler handler, URI uri)Constructs aDefaultAuthenticationService.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Promise<SsoToken,AuthenticationException>authenticate(Context context, String username, char[] password)Authenticates a subject (identified with the givenusernameandpasswordcredentials), returning asynchronously an SSO token (if the authentication succeeded) or anAuthenticationExceptionon failures (I/O, invalid credentials, ...).
-
-
-
Constructor Detail
-
DefaultAuthenticationService
public DefaultAuthenticationService(Handler handler, URI uri)
Constructs aDefaultAuthenticationService.- Parameters:
handler- HTTP handler used to communicate with AMuri- the absolute AM authentication endpoint URI (usually ending with /json/authenticate).
-
-
Method Detail
-
authenticate
public Promise<SsoToken,AuthenticationException> authenticate(Context context, String username, char[] password)
Description copied from interface:AuthenticationServiceAuthenticates a subject (identified with the givenusernameandpasswordcredentials), returning asynchronously an SSO token (if the authentication succeeded) or anAuthenticationExceptionon failures (I/O, invalid credentials, ...).- Specified by:
authenticatein interfaceAuthenticationService- Parameters:
context- Service contextusername- subject's usernamepassword- subject's credentials- Returns:
- a promise of an
SsoToken
-
-