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 Type
    Method
    Description
    void
    onAlreadyLinked(String serverName)
     
    void
    onCode(String verificationUri, String userCode, String verificationUriComplete, long expiresInSeconds)
    A device code was issued; show it to the operator.
    default void
    The owner refused on the confirmation page.
    default void
    The code expired before it was confirmed.
    default void
    onLinked(String serverName, String serverId)
    The owner confirmed and the credential was saved.
    void
    onRateLimited(long seconds)
     
    default void
    onRejected(String code, String message)
    UltiCloud rejected the request.
    void
     
    void
    The device-code request is about to be made.
  • Method Details

    • onAlreadyLinked

      void onAlreadyLinked(String serverName)
      Parameters:
      serverName - the name this server is linked under, or null
    • 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 code
      userCode - the XXXX-XXXX code
      verificationUriComplete - the page with the code filled in
      expiresInSeconds - how long the code stays valid
    • onRequestFailed

      void onRequestFailed(String reason)
      Parameters:
      reason - why no device code could be obtained
    • onLinked

      default void onLinked(String serverName, String serverId)
      The owner confirmed and the credential was saved.
      Parameters:
      serverName - the name chosen on the confirmation page, or null
      serverId - 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

      default void onRejected(String code, String message)
      UltiCloud rejected the request.
      Parameters:
      code - the backend error code
      message - the backend message, sanitised