public class DefaultAuthenticationService extends Object implements AuthenticationService
Constructor and Description |
---|
DefaultAuthenticationService(Handler handler,
URI uri)
Constructs a
DefaultAuthenticationService . |
Modifier and Type | Method and Description |
---|---|
Promise<SsoToken,AuthenticationException> |
authenticate(Context context,
String username,
char[] password)
Authenticates a subject (identified with the given
username and password credentials),
returning asynchronously an SSO token (if the authentication succeeded) or an AuthenticationException
on failures (I/O, invalid credentials, ...). |
public DefaultAuthenticationService(Handler handler, URI uri)
DefaultAuthenticationService
.handler
- HTTP handler used to communicate with AMuri
- the absolute AM authentication endpoint URI (usually ending with /json/authenticate).public Promise<SsoToken,AuthenticationException> authenticate(Context context, String username, char[] password)
AuthenticationService
username
and password
credentials),
returning asynchronously an SSO token (if the authentication succeeded) or an AuthenticationException
on failures (I/O, invalid credentials, ...).authenticate
in interface AuthenticationService
context
- Service contextusername
- subject's usernamepassword
- subject's credentialsSsoToken
Copyright 2011-2017 ForgeRock AS.