Module com.gluonhq.cloudlink.client
Interface Authenticator
-
public interface Authenticator
Contains the various tasks defined by the
UserClient
to be performed in theAuthenticationView
during the authentication process. The methods to be called during the authentication process are as follows:connected(User)
- When a user has been returned successfully.failed(String)
- When the authentication process has failed.aborted(String)
- When the process has been aborted by the user.finished()
- When the control is to be handed back to theUserClient
.
finished()
should be called at the end of theAuthenticationView.authenticate(Authenticator)
and no more code execution should happen after the call is made because these action could interfere with the user provided action infinished()
.- See Also:
UserClient
,AuthenticationView
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
aborted(String reason)
Task to be performed when the authentication process is aborted by the user.void
connected(User user)
Task to be performed when auser
has been fetched and ready to use.void
failed(String message)
Task to be performed when the authentication process has been unsuccessful.void
finished()
Optional additional task to be performed after the authentication process has finished.
-
-
-
Method Detail
-
connected
void connected(User user)
Task to be performed when auser
has been fetched and ready to use.- Parameters:
user
- An authenticated user.
-
failed
void failed(String message)
Task to be performed when the authentication process has been unsuccessful.- Parameters:
message
- Reason for failure
-
aborted
void aborted(String reason)
Task to be performed when the authentication process is aborted by the user.- Parameters:
reason
- A String with the reason for cancellation.
-
finished
void finished()
Optional additional task to be performed after the authentication process has finished. Usually these tasks are executed at the end and irrespective of the status of the authentication process.
-
-