pub async fn from_existing<'a, RE, C>(
        http_client: &'a C,
        access_token: AccessToken,
        refresh_token: impl Into<Option<RefreshToken>>,
        client_secret: ClientSecret,
    ) -> Result<AppAccessToken, ValidationError<<C as Client<'a>>::Error>>
    where
        C: Client<'a>,
    {
        let token = access_token;
        let validated = crate::validate_token(http_client, &token).await?;
        Ok(Self::from_existing_unchecked(
            token,
            refresh_token.into(),
            validated.client_id,
            client_secret,
            validated.scopes,
            Some(validated.expires_in),
        ))
    }
/// Assemble token and validate it. Retrieves [`client_id`](TwitchToken::client_id) and [`scopes`](TwitchToken::scopes).
Assemble token and validate it.
Assemble token and validate it .
pub async fn from_existing<'a, RE, C>(
        http_client: &'a C,
        access_token: AccessToken,
        refresh_token: impl Into<Option<RefreshToken>>,
        client_secret: ClientSecret,
    ) -> Result<AppAccessToken, ValidationError<<C as Client<'a>>::Error>>
    where
        C: Client<'a>,
    {
        let token = access_token;
        let validated = crate::validate_token(http_client, &token).await?;
        Ok(Self::from_existing_unchecked(
            token,
            refresh_token.into(),
            validated.client_id,
            client_secret,
            validated.scopes,
            Some(validated.expires_in),
        ))
    }
pub async fn from_existing < ' a , RE , C > ( http_client : & ' a C , access_token : AccessToken , refresh_token : impl Into < Option < RefreshToken > > , client_secret : ClientSecret , ) -> Result < AppAccessToken , ValidationError < < C as Client < ' a > > :: Error > > where C : Client < ' a > , { let token = access_token ; let validated = crate :: validate_token ( http_client , & token ) . await ? ; Ok ( Self :: from_existing_unchecked ( token , refresh_token . into ( ) , validated . client_id , client_secret , validated . scopes , Some ( validated . expires_in ) , ) ) }
Assemble token and validate it.
Assemble token and validate it .
http_client
&'a C
access_token
AccessToken
refresh_token
impl Into<Option<RefreshToken>>
client_secret
ClientSecret