pub fn exchange_token_request<ReqUri, RedirectUri>(
    uri: ReqUri,
    redirect_uri: RedirectUri,
    auth: &ClientAuthentication,
    auth_code: &str
) -> Result<Request<Vec<u8>>, RequestError>
where ReqUri: TryInto<Uri>, RedirectUri: TryInto<Uri>,
Expand description

Construct a token exchange request object For PKCE flow pass in the code_verifier and omit the client_secret.

For authorization code flow pass in client_secret and omit code_verifier.

Also supports edge cases where i.e. a development machine requires both client_secret and code_verifier. Just pass in them both in such case.