pub enum PollDeviceCodeEvent {
AuthorizationPending,
AuthorizationDeclined,
BadVerificationCode,
ExpiredToken,
AccessDenied,
SlowDown,
}
Expand description
Response types used when polling for a device code https://datatracker.ietf.org/doc/html/rfc8628#section-3.5
Variants§
AuthorizationPending
The user hasn’t finished authenticating, but hasn’t canceled the flow. Repeat the request after at least interval seconds.
AuthorizationDeclined
The end user denied the authorization request. Stop polling and revert to an unauthenticated state.
BadVerificationCode
The device_code sent to the /token endpoint wasn’t recognized. Verify that the client is sending the correct device_code in the request.
ExpiredToken
Value of expires_in has been exceeded and authentication is no longer possible with device_code. Stop polling and revert to an unauthenticated state.
AccessDenied
Not yet supported by Microsoft but listed in the specification.
The authorization request was denied.
SlowDown
Not yet supported by Microsoft but listed in the specification.
A variant of “authorization_pending”, the authorization request is still pending and polling should continue, but the interval MUST be increased by 5 seconds for this and all subsequent requests.
Implementations§
Trait Implementations§
Source§impl AsRef<str> for PollDeviceCodeEvent
impl AsRef<str> for PollDeviceCodeEvent
Source§impl Clone for PollDeviceCodeEvent
impl Clone for PollDeviceCodeEvent
Source§fn clone(&self) -> PollDeviceCodeEvent
fn clone(&self) -> PollDeviceCodeEvent
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more