public interface AuthenticationProvider
Modifier and Type | Method and Description |
---|---|
AuthenticatedUser |
authenticateUser(Credentials credentials)
Returns an AuthenticatedUser representing the user authenticated by the
given credentials, if any.
|
UserContext |
decorate(UserContext context,
AuthenticatedUser authenticatedUser,
Credentials credentials)
Given a UserContext returned from getUserContext() of a different
AuthenticationProvider, returns a UserContext instance which decorates
(wraps) that UserContext, delegating and overriding implemented
functions as necessary.
|
String |
getIdentifier()
Returns the identifier which uniquely and consistently identifies this
AuthenticationProvider implementation.
|
Object |
getResource()
Returns an arbitrary REST resource representing this
AuthenticationProvider.
|
UserContext |
getUserContext(AuthenticatedUser authenticatedUser)
Returns the UserContext of the user authenticated by the given
credentials.
|
UserContext |
redecorate(UserContext decorated,
UserContext context,
AuthenticatedUser authenticatedUser,
Credentials credentials)
Given a UserContext returned by updateUserContext() of a different
AuthenticationProvider, returns a UserContext instance which decorates
(wraps) that UserContext, delegating and overriding implemented
functions as necessary.
|
void |
shutdown()
Frees all resources associated with this AuthenticationProvider.
|
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,
Credentials credentials)
Returns a new or updated UserContext for the given AuthenticatedUser
already having the given UserContext.
|
String getIdentifier()
Object getResource() throws org.apache.guacamole.GuacamoleException
org.apache.guacamole.GuacamoleException
- If the REST resource cannot be returned due to an error.AuthenticatedUser authenticateUser(Credentials credentials) throws org.apache.guacamole.GuacamoleException
credentials
- The credentials to use for authentication.org.apache.guacamole.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.AuthenticatedUser updateAuthenticatedUser(AuthenticatedUser authenticatedUser, Credentials credentials) throws org.apache.guacamole.GuacamoleException
credentials
- The credentials to use for authentication.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.org.apache.guacamole.GuacamoleException
- If an error occurs while updating the AuthenticatedUser.UserContext getUserContext(AuthenticatedUser authenticatedUser) throws org.apache.guacamole.GuacamoleException
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.org.apache.guacamole.GuacamoleException
- If an error occurs while creating the UserContext.UserContext updateUserContext(UserContext context, AuthenticatedUser authenticatedUser, Credentials credentials) throws org.apache.guacamole.GuacamoleException
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.credentials
- The credentials which were most recently submitted. These are not
guaranteed to be the same as the credentials associated with the
AuthenticatedUser when they originally authenticated.org.apache.guacamole.GuacamoleException
- If an error occurs while updating the UserContext.UserContext decorate(UserContext context, AuthenticatedUser authenticatedUser, Credentials credentials) throws org.apache.guacamole.GuacamoleException
context
- An existing UserContext generated by getUserContext() of a different
AuthenticationProvider.authenticatedUser
- The AuthenticatedUser object representing the user associated with
the given UserContext.credentials
- The credentials which were most recently submitted for the given
AuthenticatedUser. These are not guaranteed to be the same as the
credentials associated with the AuthenticatedUser object, which are
the credentials provided when the user originally authenticated.org.apache.guacamole.GuacamoleException
- If the UserContext cannot be decorated due to an error.UserContext redecorate(UserContext decorated, UserContext context, AuthenticatedUser authenticatedUser, Credentials credentials) throws org.apache.guacamole.GuacamoleException
decorated
- The UserContext returned when decorate() was invoked on this
AuthenticationProvider for the UserContext which was just updated
via a call to updateUserContext().context
- An existing UserContext generated by updateUserContext() of a
different AuthenticationProvider.authenticatedUser
- The AuthenticatedUser object representing the user associated with
the given UserContext.credentials
- The credentials which were most recently submitted for the given
AuthenticatedUser. These are not guaranteed to be the same as the
credentials associated with the AuthenticatedUser object, which are
the credentials provided when the user originally authenticated.org.apache.guacamole.GuacamoleException
- If the UserContext cannot be decorated due to an error.void shutdown()
Copyright © 2018. All rights reserved.