Class AuthenticatorAuthenticationService
java.lang.Object
org.forgerock.openig.tools.authentication.AuthenticatorAuthenticationService
- All Implemented Interfaces:
AuthenticationService
Provides an implementation of the
AuthenticationService
using a Authenticator
plugin.-
Method Summary
Modifier and TypeMethodDescriptionauthenticate
(Context context, String username, SecretReference<GenericSecret> passwordRef) Authenticates a subject (identified with the givenusername
andpasswordRef
credentials), returning asynchronously an SSO token (if the authentication succeeded) or anAuthenticationException
on failures (I/O, invalid credentials, ...).static AuthenticationService
createAgentAuthenticationService
(Handler amHandler, URI authenticateUri, AmVersion version) Return an instance of anAuthenticationService
for Agent authentication based on theAmVersion
.
-
Method Details
-
createAgentAuthenticationService
public static AuthenticationService createAgentAuthenticationService(Handler amHandler, URI authenticateUri, AmVersion version) Return an instance of anAuthenticationService
for Agent authentication based on theAmVersion
.- Parameters:
amHandler
- theHandler
to use when making authentication requests.authenticateUri
- theURI
to use when authenticating.version
- theAmVersion
details.- Returns:
- an instance of an
AuthenticationService
for Agent authentication based on theAmVersion
.
-
authenticate
public Promise<SsoToken,AuthenticationException> authenticate(Context context, String username, SecretReference<GenericSecret> passwordRef) Description copied from interface:AuthenticationService
Authenticates a subject (identified with the givenusername
andpasswordRef
credentials), returning asynchronously an SSO token (if the authentication succeeded) or anAuthenticationException
on failures (I/O, invalid credentials, ...).- Specified by:
authenticate
in interfaceAuthenticationService
- Parameters:
context
- Service contextusername
- subject's usernamepasswordRef
- subject's credentials as aSecretReference
- Returns:
- a promise of an
SsoToken
-