mirror of
https://github.com/yuzu-emu/liftinstall.git
synced 2024-12-23 00:45:37 +00:00
Force disable exp and nbf validation.
Some clients had the wrong time information so it would fail to validate their token when installing. Remove these checks since they'll be checked on the server side anyway
This commit is contained in:
parent
6af46ec703
commit
eb556c8cab
|
@ -138,7 +138,7 @@ pub fn validate_token(
|
||||||
};
|
};
|
||||||
|
|
||||||
// Configure validation for audience and issuer if the configuration provides it
|
// Configure validation for audience and issuer if the configuration provides it
|
||||||
let validation = match validation {
|
let mut validation = match validation {
|
||||||
Some(v) => {
|
Some(v) => {
|
||||||
let mut valid = Validation::new(Algorithm::RS256);
|
let mut valid = Validation::new(Algorithm::RS256);
|
||||||
valid.iss = v.iss;
|
valid.iss = v.iss;
|
||||||
|
@ -149,7 +149,8 @@ pub fn validate_token(
|
||||||
}
|
}
|
||||||
None => Validation::default(),
|
None => Validation::default(),
|
||||||
};
|
};
|
||||||
|
validation.validate_exp = false;
|
||||||
|
validation.validate_nbf = false;
|
||||||
// Verify the JWT token
|
// Verify the JWT token
|
||||||
decode::<JWTClaims>(&body, pub_key.as_slice(), &validation)
|
decode::<JWTClaims>(&body, pub_key.as_slice(), &validation)
|
||||||
.map(|tok| tok.claims)
|
.map(|tok| tok.claims)
|
||||||
|
|
Loading…
Reference in a new issue