7 releases (4 breaking)

new 0.5.0 Apr 12, 2024
0.4.0 Jul 29, 2023
0.3.1 Oct 29, 2022
0.2.1 Sep 20, 2022
0.1.0 Sep 19, 2022

#240 in Authentication

32 downloads per month
Used in cloudformatious-cli

MIT license

60KB
1K SLoC

aws_sso_flow

A Rust library for AWS SSO authentication.

Installation

The crate is published to crates.io and can be added to a project using cargo add:

cargo add aws_sso_flow

TLS

Rustls is used for TLS support by default. You can use a platform-specific implementation by disabling default features and enabling the native-tls feature:

cargo add aws_sso_flow --no-default-features --features native-tls

Usage

See docs.rs for complete usage documentation.

Example

use std::convert::Infallible;

let credentials = aws_sso_flow::authenticate(|url| async move {
   println!("Go to {url} to sign in with SSO");
   Ok::<_, Infallible>(())
}).await?;

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT


lib.rs:

AWS SSO authentication flow.

See authenticate for the main entrypoint to the crate.

use std::convert::Infallible;

let credentials = aws_sso_flow::authenticate(|url| async move {
    println!("Go to {url} to sign in with SSO");
    Ok::<_, Infallible>(())
}).await?;

Dependencies

~16–30MB
~466K SLoC