Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Keats/jsonwebtoken
/ functions
Functions
231 in github.com/Keats/jsonwebtoken
⨍
Functions
231
◇
Types & classes
65
↓ 35 callers
Function
validate
(claims: ClaimsForValidation, options: &Validation)
src/validation.rs:267
↓ 33 callers
Function
deserialize_claims
(claims: &serde_json::Value)
src/validation.rs:412
↓ 32 callers
Function
new_error
A constructor for `Error`. Intended for use in custom crypto providers.
src/errors.rs:8
↓ 27 callers
Function
encode
Encode the header and claims given and sign the payload using the algorithm from the header and the key. If the algorithm given is RSA or EC, the key
src/jws.rs:37
↓ 16 callers
Method
kind
Return the specific type of this error.
src/errors.rs:21
↓ 12 callers
Method
as_bytes
Get the value of the key.
src/decoding.rs:232
↓ 10 callers
Function
b64_decode
(input: T)
src/serialization.rs:12
↓ 10 callers
Function
b64_encode
(input: T)
src/serialization.rs:7
↓ 10 callers
Function
verify
Compares the signature given with a re-computed signature for HMAC or using the public key for RSA/EC. If you just want to decode a JWT, use `decode`
src/crypto/mod.rs:61
↓ 9 callers
Method
family
The algorithm family this key is for.
src/decoding.rs:85
↓ 9 callers
Function
get_default
()
src/crypto/mod.rs:184
↓ 9 callers
Method
inner
Get the value of the key.
src/encoding.rs:113
↓ 9 callers
Method
set_audience
`aud` is a collection of one or more acceptable audience members The simple usage is `set_audience(&["some aud name"])`
src/validation.rs:146
↓ 9 callers
Function
sign
Take the payload of a JWT, sign it using the algorithm given and return the base64 url safe encoded of the result. If you just want to encode a JWT,
src/crypto/mod.rs:48
↓ 8 callers
Method
set_required_spec_claims
Which claims are required to be present for this JWT to be considered valid. The only values that will be considered are "exp", "nbf", "aud", "iss", "
src/validation.rs:161
↓ 5 callers
Method
deserialize
(&'a self)
src/serialization.rs:34
↓ 5 callers
Method
set_issuer
`iss` is a collection of one or more acceptable issuers members The simple usage is `set_issuer(&["some iss name"])`
src/validation.rs:152
↓ 4 callers
Function
b64_encode_part
Serializes a struct to JSON and encodes it in base64
src/serialization.rs:17
↓ 4 callers
Method
clone
(&self)
src/decoding.rs:30
↓ 4 callers
Function
deserialize
Attempts to deserialize an i64 and use as a Unix timestamp
examples/custom_time.rs:54
↓ 4 callers
Function
extract_first_bitstring
This really just finds and returns the first bitstring or octet string Which is the x coordinate for EC public keys And the DER contents of an RSA key
src/pem/decoder.rs:189
↓ 4 callers
Method
insecure_disable_signature_validation
(&mut self)
src/validation.rs:172
↓ 4 callers
Method
verify
(&self, msg: &[u8], signature: &Vec<u8>)
src/crypto/aws_lc/eddsa.rs:50
↓ 3 callers
Function
decode_header
Decode a JWT without any signature verification/validations and return its [Header](struct.Header.html). If the token has an invalid format (ie 3 par
src/decoding.rs:323
↓ 3 callers
Function
get_current_timestamp
()
src/validation.rs:186
↓ 2 callers
Method
algorithm
(&self)
src/crypto/aws_lc/eddsa.rs:32
↓ 2 callers
Method
as_rsa_key
Can be PKCS1 or PKCS8
src/pem/decoder.rs:172
↓ 2 callers
Function
is_subset
(reference: &HashSet<String>, given: &HashSet<BorrowedCowIfPossible<'_>>)
src/validation.rs:258
↓ 2 callers
Method
to_algorithm
(self)
src/jwk.rs:232
↓ 2 callers
Method
try_sign
(&self, msg: &[u8])
src/crypto/aws_lc/eddsa.rs:26
↓ 2 callers
Method
verify
(&self, msg: &[u8], signature: &Vec<u8>)
src/crypto/rust_crypto/eddsa.rs:57
↓ 2 callers
Function
verify_signature_body
( message: &[u8], signature: &[u8], header: &Header, validation: &Validation, verifying_pr
src/decoding.rs:330
↓ 1 callers
Method
algorithms
A list of all possible Algorithms that are part of the family.
src/algorithms.rs:22
↓ 1 callers
Method
as_ec_private_key
Can only be PKCS8
src/pem/decoder.rs:128
↓ 1 callers
Method
as_ec_public_key
Can only be PKCS8
src/pem/decoder.rs:139
↓ 1 callers
Method
as_ed_private_key
Can only be PKCS8
src/pem/decoder.rs:150
↓ 1 callers
Method
as_ed_public_key
Can only be PKCS8
src/pem/decoder.rs:161
↓ 1 callers
Function
classify_pem
Find whether this is EC, RSA, or Ed
src/pem/decoder.rs:211
↓ 1 callers
Method
family
The algorithm family this key is for.
src/encoding.rs:29
↓ 1 callers
Method
find
Find the key in the set that matches the given key id, if any.
src/jwk.rs:558
↓ 1 callers
Function
install_default
( default_provider: &'static CryptoProvider, )
src/crypto/mod.rs:178
↓ 1 callers
Method
thumbprint
Compute the thumbprint of the JWK. Per [RFC-7638](https://datatracker.ietf.org/doc/html/rfc7638)
src/jwk.rs:499
↓ 1 callers
Function
verify_signature
Verify the signature of a JWT, and return a header object and raw payload. If the token or its signature is invalid, it will return an error.
src/decoding.rs:365
Method
algorithm
(&self)
src/crypto/rust_crypto/eddsa.rs:33
Function
aud_array_of_string_ok
()
src/validation.rs:720
Function
aud_correct_type_not_matching_fails
()
src/validation.rs:749
Function
aud_missing_fails
()
src/validation.rs:796
Function
aud_none_fails
()
src/validation.rs:766
Function
aud_string_ok
()
src/validation.rs:708
Function
aud_type_mismatch_fails
()
src/validation.rs:732
Function
aud_use_validation_struct
()
src/validation.rs:835
Function
aud_validation_skipped
()
src/validation.rs:783
Function
bench_decode
(c: &mut Criterion)
benches/jwt.rs:33
Function
bench_encode
(c: &mut Criterion)
benches/jwt.rs:12
Function
bench_encode_custom_extra_headers
(c: &mut Criterion)
benches/jwt.rs:21
Method
borrow
(&self)
src/validation.rs:253
Method
cause
(&self)
src/errors.rs:91
Function
check_hs256
()
src/jwk.rs:579
Function
check_thumbprint
()
src/jwk.rs:618
Function
compute_digest
(data: &[u8], hash_function: ThumbprintHash)
src/crypto/rust_crypto/mod.rs:58
Function
compute_digest
(data: &[u8], hash_function: ThumbprintHash)
src/crypto/aws_lc/mod.rs:51
Function
dangerous_insecure_decode_invalid_claims
()
tests/dangerous.rs:56
Function
dangerous_insecure_decode_invalid_header
()
tests/dangerous.rs:48
Function
dangerous_insecure_decode_invalid_sig
()
tests/dangerous.rs:31
Function
dangerous_insecure_decode_token_invalid_signature
()
tests/hmac.rs:245
Function
dangerous_insecure_decode_token_with_validation_wrong_algorithm
()
tests/hmac.rs:265
Function
dangerous_insecure_decode_token_wrong_algorithm
()
tests/hmac.rs:255
Function
dangerous_insecure_decode_valid_jwt
()
tests/dangerous.rs:14
Function
dangerous_insecure_decode_valid_token
()
tests/hmac.rs:235
Function
decode
Decode and validate a JWT If the token or its signature is invalid or the claims fail validation, it will return an error. ```rust use serde::{Deser
src/decoding.rs:275
Function
decode
Validate a received JWS and decode into the header and claims.
src/jws.rs:62
Function
decode_header_only
()
tests/hmac.rs:226
Function
decode_token
()
tests/hmac.rs:133
Function
decode_token_custom_headers
()
tests/hmac.rs:146
Function
decode_token_invalid_signature
()
tests/hmac.rs:178
Function
decode_token_missing_parts
()
tests/hmac.rs:166
Function
decode_token_with_bytes_secret
()
tests/hmac.rs:214
Function
decode_token_wrong_algorithm
()
tests/hmac.rs:190
Method
default
()
src/validation.rs:178
Method
default
Returns a JWT header using the default Algorithm, HS256
src/header.rs:236
Method
deserialize
( deserializer: D, )
src/validation.rs:221
Method
deserialize
(deserializer: D)
src/header.rs:56
Method
deserialize
(deserializer: D)
src/jwk.rs:45
Function
deserialize_unknown_key_algorithm
()
src/jwk.rs:609
Function
does_validation_in_right_order
()
src/validation.rs:814
Function
doesnt_panic_with_leeway_overflow
()
src/validation.rs:853
Function
ec_jwk_from_key
()
tests/ecdsa/mod.rs:175
Function
ec_x_y
()
tests/ecdsa/mod.rs:82
Function
ed_jwk
()
tests/eddsa/mod.rs:108
Function
ed_jwk
()
tests/ecdsa/mod.rs:109
Function
ed_x
()
tests/eddsa/mod.rs:82
Function
encode
Encode the header and claims given and sign the payload using the algorithm from the header and the key. If the algorithm given is RSA or EC, the key
src/encoding.rs:158
Function
encode_with_custom_header
()
tests/hmac.rs:42
Function
encode_with_extra_custom_header
()
tests/hmac.rs:64
Function
encode_with_multiple_extra_custom_headers
()
tests/hmac.rs:87
Function
encode_wrong_alg_family
()
tests/hmac.rs:202
Method
eq
(&self, other: &Self)
src/errors.rs:149
Function
exp_float_in_future_but_in_rejection_period_fails
()
src/validation.rs:445
Function
exp_float_in_future_ok
()
src/validation.rs:437
Function
exp_float_in_past_fails
()
src/validation.rs:469
next →
1–100 of 231, ranked by callers