Merge pull request #34 from mike-engel/master

Make the `TokenData` struct public
This commit is contained in:
Vincent Prouillet 2017-07-03 11:36:06 +09:00 committed by GitHub
commit 323eb37b34
3 changed files with 5 additions and 1 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
target
Cargo.lock
.idea/
.vscode

View File

@ -29,13 +29,14 @@ pub use crypto::{
verify,
};
pub use validation::Validation;
pub use serialization::TokenData;
use serde::de::DeserializeOwned;
use serde::ser::Serialize;
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};

View File

@ -11,7 +11,9 @@ use header::Header;
/// The return type of a successful call to decode
#[derive(Debug)]
pub struct TokenData<T> {
/// The decoded JWT header
pub header: Header,
/// The decoded JWT claims
pub claims: T
}