diff options
author | BlackDex <[email protected]> | 2023-06-02 22:28:30 +0200 |
---|---|---|
committer | BlackDex <[email protected]> | 2023-06-13 08:51:07 +0200 |
commit | 8e34495e73f280e1c62f0f1b63e0219225f001d7 (patch) | |
tree | 4e75f19e03a87cebf54bad3b24e69b6e79d20ea0 /src/auth.rs | |
parent | 4219249e11845bb8869c26e1182fa1d38b1a162a (diff) | |
download | vaultwarden-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.rs | 4 |
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 |