Huskarl provides tools for implementing secure OAuth2 clients in rust.
This library provides a number of grant implementations, each of which is configured with a set of parameters that define how the grant/workflow should progress.
The library also provides a caching layer for token responses; and a HTTP authorizer that can be used to make authenticated requests to resource servers.
Examples
Client Credentials Grant
let metadata = builder
.http_client
.issuer
.build
.await
.unwrap;
let grant = builder_from_metadata
.client_id
.client_auth
.dpop
.build;
let token_response = grant
.exchange
.await
.unwrap;
println!;