blob: abccd6541f5c2754389d001faa1e9e5c6c35e20d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
pub use oauth2;
pub mod client;
mod service;
pub use client::http::HttpAuthClient;
pub use service::*;
use thiserror::Error;
#[derive(Debug)]
pub enum Provider {
Discord,
}
impl std::fmt::Display for Provider {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(
f,
"{}",
match self {
Provider::Discord => "discord",
}
)
}
}
#[derive(Error, Debug)]
pub enum AuthServiceError {
#[error("invalid url provided")]
InvalidUrl(#[from] url::ParseError),
#[error("the data for key `{0}` is not available")]
Redaction(String),
#[error("invalid header (expected {expected:?}, found {found:?})")]
InvalidHeader { expected: String, found: String },
#[error("unknown data store error")]
Unknown,
}
|