Package io.jmix.email.authentication
Interface OAuth2DeviceCodeFlow
- All Known Implementing Classes:
MicrosoftOAuth2DeviceCodeFlow
@NullMarked
public interface OAuth2DeviceCodeFlow
Interface defining the OAuth2 device authorization grant ("device code flow") used to connect
a mailbox account without a redirect URI: the user opens the provider verification page on any
device and enters the displayed code.
-
Method Summary
Modifier and TypeMethodDescriptionstart()Starts the device code flow and returns a session carrying the user instructions (verification URI and user code).
-
Method Details
-
start
OAuth2DeviceCodeSession start()Starts the device code flow and returns a session carrying the user instructions (verification URI and user code).The flow completes asynchronously — track it via
OAuth2DeviceCodeSession.getStatus(). On successful completion the obtained refresh token is stored viaEmailRefreshTokenManager.- Returns:
- started session
- Throws:
IllegalStateException- if the flow cannot be started
-