Class OAuth2DeviceCodeSession

java.lang.Object
io.jmix.email.authentication.OAuth2DeviceCodeSession

@NullMarked public class OAuth2DeviceCodeSession extends Object
State of a running OAuth2DeviceCodeFlow. Instances are thread-safe: the flow implementation updates the state from background threads, the UI polls it.
  • Field Details

    • status

      protected volatile OAuth2DeviceCodeSession.Status status
    • userCode

      protected volatile @Nullable String userCode
    • verificationUri

      protected volatile @Nullable String verificationUri
    • message

      protected volatile @Nullable String message
    • errorMessage

      protected volatile @Nullable String errorMessage
  • Constructor Details

    • OAuth2DeviceCodeSession

      public OAuth2DeviceCodeSession()
  • Method Details

    • getStatus

      public OAuth2DeviceCodeSession.Status getStatus()
    • getUserCode

      public @Nullable String getUserCode()
      Returns:
      code the user must enter on the provider verification page
    • getVerificationUri

      public @Nullable String getVerificationUri()
      Returns:
      provider verification page URI
    • getMessage

      public @Nullable String getMessage()
      Returns:
      provider-supplied instruction message, if any
    • getErrorMessage

      public @Nullable String getErrorMessage()
    • init

      public void init(String userCode, String verificationUri, @Nullable String message)
      Intended to be called by OAuth2DeviceCodeFlow implementations.
    • complete

      public void complete()
      Intended to be called by OAuth2DeviceCodeFlow implementations.
    • fail

      public void fail(String errorMessage)
      Intended to be called by OAuth2DeviceCodeFlow implementations.