mirror of
https://github.com/tribufu/tribufu-rust
synced 2026-06-01 09:42:37 +00:00
Add oauth2 types
This commit is contained in:
parent
67fcf7ce3b
commit
dbe5909513
3 changed files with 208 additions and 2 deletions
20
src/token.rs
Normal file
20
src/token.rs
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
// Copyright (c) Tribufu. All Rights Reserved.
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Debug, Copy, Clone, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub enum TokenType {
|
||||
User,
|
||||
Bot,
|
||||
Client,
|
||||
Server,
|
||||
}
|
||||
|
||||
#[derive(Debug, Copy, Clone, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub enum AuthorizationType {
|
||||
ApiKey,
|
||||
Basic,
|
||||
Bearer,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue