Class AuthenticatorAuthenticationService
- java.lang.Object
-
- org.forgerock.openig.tools.authentication.AuthenticatorAuthenticationService
-
- All Implemented Interfaces:
AuthenticationService
public class AuthenticatorAuthenticationService extends Object implements AuthenticationService
Provides an implementation of theAuthenticationService
using aAuthenticator
plugin.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Promise<SsoToken,AuthenticationException>
authenticate(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 Detail
-
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
-
-