Struct yup_oauth2::RefreshFlow [] [src]

pub struct RefreshFlow<C> {
    // some fields omitted
}

Implements the Outh2 Refresh Token Flow.

Refresh an expired access token, as obtained by any other authentication flow. This flow is useful when your Token is expired and allows to obtain a new and valid access token.

Methods

impl<C> RefreshFlow<C> where C: BorrowMut<Client>
[src]

Attempt to refresh the given token, and obtain a new, valid one. If the RefreshResult is RefreshResult::Error, you may retry within an interval of your choice. If it is RefreshResult:RefreshError, your refresh token is invalid or your authorization was revoked. Therefore no further attempt shall be made, and you will have to re-authorize using the DeviceFlow

Arguments

  • authentication_url - URL matching the one used in the flow that obtained your refresh_token in the first place.
  • client_id & client_secret - as obtained when registering your application
  • refresh_token - obtained during previous call to DeviceFlow::poll_token() or equivalent

Examples

Please see the crate landing page for an example.