Function tame_oidc::oidc::exchange_token_request[][src]

pub fn exchange_token_request<ReqUri, RedirectUri>(
    uri: ReqUri,
    redirect_uri: RedirectUri,
    client_id: &str,
    auth_code: &str,
    client_secret: Option<&str>,
    code_verifier: Option<&str>
) -> Result<Request<Vec<u8>>, RequestError> where
    ReqUri: TryInto<Uri>,
    RedirectUri: TryInto<Uri>, 

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.