Class DeviceAuthorizationClient.Grant

java.lang.Object
com.ultikits.ultitools.utils.DeviceAuthorizationClient.Grant
Enclosing class:
DeviceAuthorizationClient

static final class DeviceAuthorizationClient.Grant extends Object
A device code and how to present it. toString() omits the device code.
  • Field Details

    • deviceCode

      private final String deviceCode
    • userCode

      private final String userCode
    • verificationUri

      private final String verificationUri
    • verificationUriComplete

      private final String verificationUriComplete
    • expiresInSeconds

      private final long expiresInSeconds
    • intervalSeconds

      private final long intervalSeconds
  • Constructor Details

    • Grant

      Grant(String deviceCode, String userCode, String verificationUri, String verificationUriComplete, long expiresInSeconds, long intervalSeconds)
  • Method Details

    • deviceCode

      String deviceCode()
      Returns:
      the device code -- a bearer for the grant; never log it
    • userCode

      String userCode()
      Returns:
      the XXXX-XXXX code the owner enters
    • verificationUri

      String verificationUri()
      Returns:
      the page where the owner enters the code
    • verificationUriComplete

      String verificationUriComplete()
      Returns:
      the page with the code already filled in
    • expiresInSeconds

      long expiresInSeconds()
      Returns:
      the device code lifetime in seconds
    • intervalSeconds

      long intervalSeconds()
      Returns:
      the poll interval in seconds
    • toString

      public String toString()
      Overrides:
      toString in class Object
      Returns:
      the presentable fields only -- never the device code