Package com.ultikits.ultitools.utils
Interface CloudAuthManager.DeviceLoginListener
- All Known Implementing Classes:
CloudLoginCommand.LoginOutput
- Enclosing class:
CloudAuthManager
public static interface CloudAuthManager.DeviceLoginListener
The outcomes of
CloudAuthManager.login(DeviceLoginListener). onAlreadyLinked(java.lang.String),
onRateLimited(long), onRequesting() and an overlapping-login
onRequestFailed(java.lang.String) are called on the caller's thread before login returns; every
other callback arrives later on the login session's poll executor thread.- Since:
- 6.3.1
-
Method Summary
Modifier and TypeMethodDescriptionvoidonAlreadyLinked(String serverName) voidonCode(String verificationUri, String userCode, String verificationUriComplete, long expiresInSeconds) A device code was issued; show it to the operator.default voidonDenied()The owner refused on the confirmation page.default voidThe code expired before it was confirmed.default voidThe owner confirmed and the credential was saved.voidonRateLimited(long seconds) default voidonRejected(String code, String message) UltiCloud rejected the request.voidonRequestFailed(String reason) voidThe device-code request is about to be made.
-
Method Details
-
onAlreadyLinked
- Parameters:
serverName- the name this server is linked under, ornull
-
onRateLimited
void onRateLimited(long seconds) - Parameters:
seconds- the remaining cooldown before another login attempt is allowed
-
onRequesting
void onRequesting()The device-code request is about to be made. -
onCode
void onCode(String verificationUri, String userCode, String verificationUriComplete, long expiresInSeconds) A device code was issued; show it to the operator.- Parameters:
verificationUri- the page where the owner enters the codeuserCode- theXXXX-XXXXcodeverificationUriComplete- the page with the code filled inexpiresInSeconds- how long the code stays valid
-
onRequestFailed
- Parameters:
reason- why no device code could be obtained
-
onLinked
The owner confirmed and the credential was saved.- Parameters:
serverName- the name chosen on the confirmation page, ornullserverId- the server's public id
-
onDenied
default void onDenied()The owner refused on the confirmation page. -
onExpired
default void onExpired()The code expired before it was confirmed. -
onRejected
UltiCloud rejected the request.- Parameters:
code- the backend error codemessage- the backend message, sanitised
-