diff options
author | HampusM <hampus@hampusmat.com> | 2022-09-05 17:57:28 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2022-09-05 17:57:28 +0200 |
commit | d7929e7e9fee879a28871c2195620869db291441 (patch) | |
tree | 4b2c9a6b3bf64144a994d36d0a522404548116f3 /src/errors/auth.rs | |
parent | afade48668042eeb0740c7c5a1cc3806baaedc94 (diff) |
feat: add authentication
Diffstat (limited to 'src/errors/auth.rs')
-rw-r--r-- | src/errors/auth.rs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/errors/auth.rs b/src/errors/auth.rs new file mode 100644 index 0000000..cd4741d --- /dev/null +++ b/src/errors/auth.rs @@ -0,0 +1,23 @@ +//! Authentication related error types. + +/// Authentication prompt handler error. +#[derive(Debug, thiserror::Error)] +pub enum AuthPromptHandlerError +{ + /// HTTP server failed to bind to a address. + #[error("HTTP server failed to bind to address")] + BindAddressFailed, +} + +/// Access token request error. +#[derive(Debug, thiserror::Error)] +pub enum AccessTokenRequestError +{ + /// Sending access token request failed. + #[error("Sending access token request failed")] + SendFailed(#[from] reqwest::Error), + + /// Parsing access token respone failed. + #[error("Parsing access token respone failed")] + ResponseParseFailed, +} |