public class AuthenticationProviderFacade extends Object implements AuthenticationProvider
Constructor and Description |
---|
AuthenticationProviderFacade(Class<? extends AuthenticationProvider> authProviderClass)
Creates a new AuthenticationProviderFacade which delegates all function
calls to an instance of the given AuthenticationProvider subclass.
|
Modifier and Type | Method and Description |
---|---|
AuthenticatedUser |
authenticateUser(Credentials credentials)
Returns an AuthenticatedUser representing the user authenticated by the
given credentials, if any.
|
String |
getIdentifier()
Returns the identifier which uniquely and consistently identifies this
AuthenticationProvider implementation.
|
UserContext |
getUserContext(AuthenticatedUser authenticatedUser)
Returns the UserContext of the user authenticated by the given
credentials.
|
AuthenticatedUser |
updateAuthenticatedUser(AuthenticatedUser authenticatedUser,
Credentials credentials)
Returns a new or updated AuthenticatedUser for the given credentials
already having produced the given AuthenticatedUser.
|
UserContext |
updateUserContext(UserContext context,
AuthenticatedUser authenticatedUser)
Returns a new or updated UserContext for the given AuthenticatedUser
already having the given UserContext.
|
public AuthenticationProviderFacade(Class<? extends AuthenticationProvider> authProviderClass)
authProviderClass
- The AuthenticationProvider subclass to instantiate.public String getIdentifier()
AuthenticationProvider
getIdentifier
in interface AuthenticationProvider
public AuthenticatedUser authenticateUser(Credentials credentials) throws GuacamoleException
AuthenticationProvider
authenticateUser
in interface AuthenticationProvider
credentials
- The credentials to use for authentication.GuacamoleException
- If an error occurs while authenticating the user, or if access is
temporarily, permanently, or conditionally denied, such as if the
supplied credentials are insufficient or invalid.public AuthenticatedUser updateAuthenticatedUser(AuthenticatedUser authenticatedUser, Credentials credentials) throws GuacamoleException
AuthenticationProvider
updateAuthenticatedUser
in interface AuthenticationProvider
authenticatedUser
- An AuthenticatedUser object representing the user authenticated by
an arbitrary set of credentials. The AuthenticatedUser may come from
this AuthenticationProvider or any other installed
AuthenticationProvider.credentials
- The credentials to use for authentication.GuacamoleException
- If an error occurs while updating the AuthenticatedUser.public UserContext getUserContext(AuthenticatedUser authenticatedUser) throws GuacamoleException
AuthenticationProvider
getUserContext
in interface AuthenticationProvider
authenticatedUser
- An AuthenticatedUser object representing the user authenticated by
an arbitrary set of credentials. The AuthenticatedUser may come from
this AuthenticationProvider or any other installed
AuthenticationProvider.GuacamoleException
- If an error occurs while creating the UserContext.public UserContext updateUserContext(UserContext context, AuthenticatedUser authenticatedUser) throws GuacamoleException
AuthenticationProvider
updateUserContext
in interface AuthenticationProvider
context
- The existing UserContext belonging to the user in question.authenticatedUser
- An AuthenticatedUser object representing the user authenticated by
an arbitrary set of credentials. The AuthenticatedUser may come from
this AuthenticationProvider or any other installed
AuthenticationProvider.GuacamoleException
- If an error occurs while updating the UserContext.Copyright © 2016. All rights reserved.