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 theAuthenticationServiceusing aAuthenticatorplugin.
-
-
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 givenusernameandpasswordRefcredentials), returning asynchronously an SSO token (if the authentication succeeded) or anAuthenticationExceptionon failures (I/O, invalid credentials, ...).static AuthenticationServicecreateAgentAuthenticationService(Handler amHandler, URI authenticateUri, AmVersion version)Return an instance of anAuthenticationServicefor Agent authentication based on theAmVersion.
-
-
-
Method Detail
-
createAgentAuthenticationService
public static AuthenticationService createAgentAuthenticationService(Handler amHandler, URI authenticateUri, AmVersion version)
Return an instance of anAuthenticationServicefor Agent authentication based on theAmVersion.- Parameters:
amHandler- theHandlerto use when making authentication requests.authenticateUri- theURIto use when authenticating.version- theAmVersiondetails.- Returns:
- an instance of an
AuthenticationServicefor Agent authentication based on theAmVersion.
-
authenticate
public Promise<SsoToken,AuthenticationException> authenticate(Context context, String username, SecretReference<GenericSecret> passwordRef)
Description copied from interface:AuthenticationServiceAuthenticates a subject (identified with the givenusernameandpasswordRefcredentials), 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 usernamepasswordRef- subject's credentials as aSecretReference- Returns:
- a promise of an
SsoToken
-
-