1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-07-29 22:01:14 +03:00

Allow to split JWT into parts

This commit is contained in:
Kévin Commaille
2022-09-06 10:03:58 +02:00
committed by Quentin Gliech
parent 6303175c50
commit b15b2d0c21

View File

@ -260,6 +260,10 @@ impl<'a, T> Jwt<'a, T> {
pub fn into_string(self) -> String {
self.raw.into()
}
pub fn into_parts(self) -> (JsonWebSignatureHeader, T) {
(self.header, self.payload)
}
}
#[derive(Debug, Error)]