mirror of
https://github.com/TECHNOFAB11/jwt-authorizer.git
synced 2025-12-11 23:50:07 +01:00
fix: clippy
This commit is contained in:
parent
1f9569d7d9
commit
ce0f83517e
1 changed files with 2 additions and 2 deletions
|
|
@ -97,7 +97,7 @@ impl Validation {
|
|||
self
|
||||
}
|
||||
|
||||
pub(crate) fn to_jwt_validation(&self, default_algs: &Vec<Algorithm>) -> jsonwebtoken::Validation {
|
||||
pub(crate) fn to_jwt_validation(&self, default_algs: &[Algorithm]) -> jsonwebtoken::Validation {
|
||||
let required_claims = if self.validate_exp {
|
||||
let mut claims = HashSet::with_capacity(1);
|
||||
claims.insert("exp".to_owned());
|
||||
|
|
@ -119,7 +119,7 @@ impl Validation {
|
|||
jwt_validation.aud = aud;
|
||||
jwt_validation.sub = None;
|
||||
jwt_validation.algorithms = if self.algs.is_empty() {
|
||||
default_algs.clone()
|
||||
default_algs.to_owned()
|
||||
} else {
|
||||
self.algs.clone()
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue