feat: get roles associted to api key
This commit is contained in:
@@ -1,7 +1,15 @@
|
||||
use uuid::Uuid;
|
||||
|
||||
#[derive(PartialEq, Eq, Clone, Debug)]
|
||||
pub enum ApiKeyClaimsRoles {
|
||||
Admin,
|
||||
Read,
|
||||
Write,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct ApiKeyClaims {
|
||||
pub sub: Uuid,
|
||||
pub api_key_id: Uuid,
|
||||
pub roles: Vec<ApiKeyClaimsRoles>,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user