File tree Expand file tree Collapse file tree 4 files changed +5
-5
lines changed Expand file tree Collapse file tree 4 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 11
11
- uses : actions/checkout@v2
12
12
- uses : actions-rs/toolchain@v1
13
13
with :
14
- toolchain : 1.71 .0
14
+ toolchain : 1.85 .0
15
15
default : true
16
16
profile : minimal
17
17
components : rustfmt, clippy
Original file line number Diff line number Diff line change 1
1
[package ]
2
2
name = " jwtk"
3
- version = " 0.3 .0"
3
+ version = " 0.4 .0"
4
4
edition = " 2018"
5
- repository = " https://github.com/sopium /jwtk"
5
+ repository = " https://github.com/blckngm /jwtk"
6
6
license = " MIT"
7
7
description = " JWT signing (JWS) and verification, with first class JWK and JWK Set (JWKS) support."
8
8
Original file line number Diff line number Diff line change @@ -242,7 +242,7 @@ impl<ExtraClaims> HeaderAndClaims<ExtraClaims> {
242
242
pub fn iat_is_later_than ( & self , t : SystemTime ) -> bool {
243
243
self . claims
244
244
. iat
245
- . map_or ( false , |iat| iat > t. duration_since ( UNIX_EPOCH ) . unwrap ( ) )
245
+ . is_some_and ( |iat| iat > t. duration_since ( UNIX_EPOCH ) . unwrap ( ) )
246
246
}
247
247
248
248
/// Set token expiration time (`exp`) to some time after the current time,
Original file line number Diff line number Diff line change @@ -224,7 +224,7 @@ impl RsaPublicKey {
224
224
225
225
/// Both `BEGIN PUBLIC KEY` and `BEGIN RSA PUBLIC KEY` are OK.
226
226
pub fn from_pem ( pem : & [ u8 ] , algorithm : Option < RsaAlgorithm > ) -> Result < Self > {
227
- if std:: str:: from_utf8 ( pem) . map_or ( false , |pem| pem. contains ( "BEGIN RSA" ) ) {
227
+ if std:: str:: from_utf8 ( pem) . is_ok_and ( |pem| pem. contains ( "BEGIN RSA" ) ) {
228
228
let rsa = Rsa :: public_key_from_pem_pkcs1 ( pem) ?;
229
229
Self :: from_pkey ( PKey :: from_rsa ( rsa) ?, algorithm)
230
230
} else {
You can’t perform that action at this time.
0 commit comments