Add oauth2 types

This commit is contained in:
Guilherme Werner 2023-12-03 14:10:37 -03:00
parent 67fcf7ce3b
commit dbe5909513
3 changed files with 208 additions and 2 deletions

20
src/token.rs Normal file
View 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,
}