Make the `TokenData` struct public
This commit is contained in:
parent
ff6e8a3490
commit
5758c0008c
|
@ -1,3 +1,4 @@
|
||||||
target
|
target
|
||||||
Cargo.lock
|
Cargo.lock
|
||||||
.idea/
|
.idea/
|
||||||
|
.vscode
|
||||||
|
|
|
@ -29,13 +29,14 @@ pub use crypto::{
|
||||||
verify,
|
verify,
|
||||||
};
|
};
|
||||||
pub use validation::Validation;
|
pub use validation::Validation;
|
||||||
|
pub use serialization::TokenData;
|
||||||
|
|
||||||
|
|
||||||
use serde::de::DeserializeOwned;
|
use serde::de::DeserializeOwned;
|
||||||
use serde::ser::Serialize;
|
use serde::ser::Serialize;
|
||||||
|
|
||||||
use errors::{Result, ErrorKind};
|
use errors::{Result, ErrorKind};
|
||||||
use serialization::{TokenData, from_jwt_part, from_jwt_part_claims, to_jwt_part};
|
use serialization::{from_jwt_part, from_jwt_part_claims, to_jwt_part};
|
||||||
use validation::{validate};
|
use validation::{validate};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,9 @@ use header::Header;
|
||||||
/// The return type of a successful call to decode
|
/// The return type of a successful call to decode
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct TokenData<T> {
|
pub struct TokenData<T> {
|
||||||
|
/// The decoded JWT header
|
||||||
pub header: Header,
|
pub header: Header,
|
||||||
|
/// The decoded JWT claims
|
||||||
pub claims: T
|
pub claims: T
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue