Skip to content

Commit

Permalink
Merge pull request #3 from chendave/public
Browse files Browse the repository at this point in the history
make `from_jwt` public
  • Loading branch information
thomas-fossati authored Oct 19, 2023
2 parents fc49755 + ddc211e commit cc6ea53
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/ear.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,11 @@ impl Ear {
Self::from_jwt(token, jwt_alg, &dk)
}

fn from_jwt(token: &str, alg: jwt::Algorithm, key: &jwt::DecodingKey) -> Result<Self, Error> {
pub fn from_jwt(
token: &str,
alg: jwt::Algorithm,
key: &jwt::DecodingKey,
) -> Result<Self, Error> {
let mut validation = jwt::Validation::new(alg);
// the default validation sets "exp" as a mandatory claim, which an E is not required to
// have.
Expand Down

0 comments on commit cc6ea53

Please sign in to comment.