OAuth 1.0a crate
This crate provides an oauth 1.0a client implementation fully-async with logging, metrics and tracing facilities. It was firstly designed to interact with the Clever-Cloud's api, but has been extended to be more generic.
Status
This crate is under development, you can use it, but it may have bugs or unimplemented features.
Installation
To install this dependency, just add the following line to your Cargo.toml
manifest.
= { = "^1.0.0", = ["telemetry"] }
Usage
Below, you will find an example of executing a simple request to an api.
use Error;
use ;
async
Features
name | description |
---|---|
client | The oauth 1.0a client implementation |
logging | Use the log facility crate to print logs |
metrics | Use lazy_static and prometheus crates to register metrics |
Metrics
Below, the exposed metrics gathered by prometheus:
name | labels | kind | description |
---|---|---|---|
oauth10a_client_request | endpoint: String, method: String, status: Integer | Counter | number of request on api |
oauth10a_client_request_duration | endpoint: String, method: String, status: Integer, unit: String | Counter | duration of request on api |
License
See the license.