pub fn new(
        sts_client: StsClient,
        duration: Option<Duration>,
        mfa_serial: Option<String>,
    ) -> StsSessionCredentialsProvider {
        StsSessionCredentialsProvider {
            sts_client: Box::new(sts_client),
            session_duration: duration
                .unwrap_or(Duration::seconds(DEFAULT_DURATION_SECONDS as i64)),
            mfa_serial,
            mfa_code: None,
        }
    }
Creates a new `StsSessionCredentialsProvider` with the given
[StsClient](struct.StsClient.html) and session parameters.

* `sts_client` - The [StsClient](struct.StsClient.html) to use to acquire session tokens.
* `duration` - The duration of the session tokens. Default 1 hour.
* `mfa_serial` - Optional MFA hardware device serial number or virtual device ARN. Set the MFA code with `set_mfa_code`.
rusoto/services/sts/src/custom/credential.rs