aboutsummaryrefslogtreecommitdiff
path: root/src/auth.rs
diff options
context:
space:
mode:
authorBlackDex <[email protected]>2023-06-02 22:28:30 +0200
committerBlackDex <[email protected]>2023-06-13 08:51:07 +0200
commit8e34495e73f280e1c62f0f1b63e0219225f001d7 (patch)
tree4e75f19e03a87cebf54bad3b24e69b6e79d20ea0 /src/auth.rs
parent4219249e11845bb8869c26e1182fa1d38b1a162a (diff)
downloadvaultwarden-8e34495e73f280e1c62f0f1b63e0219225f001d7.tar.gz
vaultwarden-8e34495e73f280e1c62f0f1b63e0219225f001d7.zip
Merge and modify PR from @Kurnihil
Merging a PR from @Kurnihil into the already rebased branch. Made some small changes to make it work with newer changes. Some finetuning is probably still needed. Co-authored-by: Daniele Andrei <[email protected]> Co-authored-by: Kurnihil
Diffstat (limited to 'src/auth.rs')
-rw-r--r--src/auth.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/auth.rs b/src/auth.rs
index d96e98e1..6b01a4d4 100644
--- a/src/auth.rs
+++ b/src/auth.rs
@@ -94,6 +94,10 @@ pub fn decode_send(token: &str) -> Result<BasicJwtClaims, Error> {
decode_jwt(token, JWT_SEND_ISSUER.to_string())
}
+pub fn decode_api_org(token: &str) -> Result<OrgApiKeyLoginJwtClaims, Error> {
+ decode_jwt(token, JWT_ORG_API_KEY_ISSUER.to_string())
+}
+
#[derive(Debug, Serialize, Deserialize)]
pub struct LoginJwtClaims {
// Not before