File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -38,8 +38,8 @@ pub(crate) enum DecodingKeyKind {
38
38
RsaModulusExponent { n : Vec < u8 > , e : Vec < u8 > } ,
39
39
}
40
40
41
- /// All the different kind of keys we can use to decode a JWT
42
- /// This key can be re-used so make sure you only initialize it once if you can for better performance
41
+ /// All the different kind of keys we can use to decode a JWT.
42
+ /// This key can be re-used so make sure you only initialize it once if you can for better performance.
43
43
#[ derive( Clone ) ]
44
44
pub struct DecodingKey {
45
45
pub ( crate ) family : AlgorithmFamily ,
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ use crate::pem::decoder::PemEncodedKey;
10
10
use crate :: serialization:: b64_encode_part;
11
11
12
12
/// A key to encode a JWT with. Can be a secret, a PEM-encoded key or a DER-encoded key.
13
- /// This key can be re-used so make sure you only initialize it once if you can for better performance
13
+ /// This key can be re-used so make sure you only initialize it once if you can for better performance.
14
14
#[ derive( Clone ) ]
15
15
pub struct EncodingKey {
16
16
pub ( crate ) family : AlgorithmFamily ,
Original file line number Diff line number Diff line change @@ -122,9 +122,9 @@ impl Validation {
122
122
self . required_spec_claims = items. iter ( ) . map ( |x| x. to_string ( ) ) . collect ( ) ;
123
123
}
124
124
125
- /// Whether to validate the JWT cryptographic signature
126
- /// Very insecure to turn that off , only do it if you know what you're doing.
127
- /// With this flag turned off, you should not trust any of the values of the claims.
125
+ /// Whether to validate the JWT cryptographic signature.
126
+ /// Disabling validation is dangerous , only do it if you know what you're doing.
127
+ /// With validation disabled you should not trust any of the values of the claims.
128
128
pub fn insecure_disable_signature_validation ( & mut self ) {
129
129
self . validate_signature = false ;
130
130
}
@@ -136,7 +136,7 @@ impl Default for Validation {
136
136
}
137
137
}
138
138
139
- /// Gets the current timestamp in the format JWT expect
139
+ /// Gets the current timestamp in the format expected by JWTs.
140
140
pub fn get_current_timestamp ( ) -> u64 {
141
141
let start = SystemTime :: now ( ) ;
142
142
start. duration_since ( UNIX_EPOCH ) . expect ( "Time went backwards" ) . as_secs ( )
You can’t perform that action at this time.
0 commit comments