The first abstraction is about the Identity Manager: https://cloud.ibm.com/apidocs/iam-identity-token-api.json
Single implementation of Authenticate with Token and API key:
Dependencies ```toml
[dependencies]
tokio = { version = "1", features = ["full"] }
ibmcloud-core = "0.1.2"
Main.rs
rust
//src/main.rs
use ibmcloudcore::authenticators::tokenapi::{
AuthenticatorApiClient, ResponseType, TokenResponse,
};
async fn main() -> Result<(), Box
// This turn your client authenticated
auth.authenticate().await?;
println!("{:?}", auth.clone());
// If you need to get token, this is the best choice.
// This feature manages the life cycle of your token.
let token = auth.get_token();
Ok(())
}
```