MCPcopy Create free account

hub / github.com/Keats/jsonwebtoken / functions

Functions262 in github.com/Keats/jsonwebtoken

↓ 35 callersFunctionvalidate
(claims: ClaimsForValidation, options: &Validation)
src/validation.rs:251
↓ 33 callersFunctiondeserialize_claims
(claims: &serde_json::Value)
src/validation.rs:406
↓ 31 callersFunctionencode
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
↓ 18 callersMethodkind
Return the specific type of this error.
src/errors.rs:21
↓ 17 callersFunctionnew_error
A constructor for `Error`. Intended for use in custom crypto providers.
src/errors.rs:8
↓ 12 callersMethodas_bytes
Get the value of the key. To be used for defining your own `CryptoProvider`.
src/encoding.rs:124
↓ 11 callersMethodinsert
Add the given (key, value) pair to the header
src/header.rs:133
↓ 10 callersMethodset_audience
`aud` is a collection of one or more acceptable audience members The simple usage is `set_audience(&["some aud name"])`
src/validation.rs:141
↓ 9 callersFunctionb64_decode
(input: T)
src/serialization.rs:12
↓ 9 callersFunctionget_default
()
src/crypto/mod.rs:223
↓ 9 callersFunctionsign
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 callersFunctionb64_encode
(input: T)
src/serialization.rs:7
↓ 8 callersMethodset_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:156
↓ 8 callersFunctionverify
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
↓ 6 callersMethodclone
(&self)
src/decoding.rs:30
↓ 6 callersMethodfamily
The algorithm family this key is for.
src/decoding.rs:85
↓ 6 callersMethodset_issuer
`iss` is a collection of one or more acceptable issuers members The simple usage is `set_issuer(&["some iss name"])`
src/validation.rs:147
↓ 4 callersMethoddeserialize
(&'a self)
src/serialization.rs:34
↓ 3 callersFunctiondeserialize
Attempts to deserialize an i64 and use as a Unix timestamp
examples/custom_time.rs:54
↓ 3 callersFunctionextract_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:188
↓ 3 callersFunctionget_current_timestamp
()
src/validation.rs:170
↓ 3 callersMethodtry_get_as_bytes
Try to get the key in raw byte format. To be used for defining your own `CryptoProvider`.
src/decoding.rs:245
↓ 3 callersMethodverify
(&self, msg: &[u8], signature: &Vec<u8>)
src/crypto/aws_lc/eddsa.rs:50
↓ 2 callersMethodalgorithm
(&self)
src/crypto/aws_lc/eddsa.rs:32
↓ 2 callersMethodas_rsa_key
Can be PKCS1 or PKCS8
src/pem/decoder.rs:171
↓ 2 callersFunctionb64_encode_part
Serializes a struct to JSON and encodes it in base64
src/serialization.rs:17
↓ 2 callersFunctiondecode_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:343
↓ 2 callersMethodto_algorithm
(self)
src/jwk.rs:272
↓ 2 callersFunctiontry_get_default
()
src/crypto/mod.rs:212
↓ 2 callersMethodtry_sign
(&self, msg: &[u8])
src/crypto/aws_lc/eddsa.rs:26
↓ 2 callersFunctionverify_signature_body
( message: &[u8], signature: &[u8], header: &Header, validation: &Validation, verifying_pr
src/decoding.rs:350
↓ 1 callersMethodalgorithms
A list of all possible Algorithms that are part of the family.
src/algorithms.rs:22
↓ 1 callersMethodas_ec_private_key
Can only be PKCS8
src/pem/decoder.rs:127
↓ 1 callersMethodas_ec_public_key
Can only be PKCS8
src/pem/decoder.rs:138
↓ 1 callersMethodas_ed_private_key
Can only be PKCS8
src/pem/decoder.rs:149
↓ 1 callersMethodas_ed_public_key
Can only be PKCS8
src/pem/decoder.rs:160
↓ 1 callersFunctionclassify_pem
Find whether this is EC, RSA, or Ed Note: Ed448 keys are not supported
src/pem/decoder.rs:211
↓ 1 callersFunctionec_pub_components_from_public_key
Given bitstring from DER encoded public key, extract the associated curve and the EC public key components (x, y)
src/crypto/mod.rs:182
↓ 1 callersMethodfamily
The algorithm family this key is for.
src/encoding.rs:29
↓ 1 callersMethodfind
Find the key in the set that matches the given key id, if any.
src/jwk.rs:678
↓ 1 callersMethodget
Try to get the value to a given key, deserialized as `T`
src/header.rs:119
↓ 1 callersFunctioninstall_default
( default_provider: &'static CryptoProvider, )
src/crypto/mod.rs:206
↓ 1 callersMethodinstall_default
Set this `CryptoProvider` as the default for this process. This can be called successfully at most once in any process execution.
src/crypto/mod.rs:96
↓ 1 callersFunctionis_subset
(reference: &HashSet<String>, given: &HashSet<BorrowedCowIfPossible<'_>>)
src/validation.rs:242
↓ 1 callersFunctionsign
(claims: &Value)
src/validation.rs:862
↓ 1 callersMethodthumbprint
Compute the thumbprint of the JWK. Per [RFC-7638](https://datatracker.ietf.org/doc/html/rfc7638)
src/jwk.rs:615
↓ 1 callersMethodverify
(&self, msg: &[u8], signature: &Vec<u8>)
src/crypto/rust_crypto/eddsa.rs:57
Methodalgorithm
(&self)
src/crypto/rust_crypto/eddsa.rs:33
Functionaud_array_of_string_ok
()
src/validation.rs:714
Functionaud_correct_type_not_matching_fails
()
src/validation.rs:743
Functionaud_missing_fails
()
src/validation.rs:790
Functionaud_none_fails
()
src/validation.rs:760
Functionaud_string_ok
()
src/validation.rs:702
Functionaud_type_mismatch_fails
()
src/validation.rs:726
Functionaud_use_validation_struct
()
src/validation.rs:829
Functionaud_validation_skipped
()
src/validation.rs:777
Functionbench_decode
(c: &mut Criterion)
benches/jwt.rs:38
Functionbench_encode
(c: &mut Criterion)
benches/jwt.rs:15
Functionbench_encode_custom_extra_headers
(c: &mut Criterion)
benches/jwt.rs:26
Methodborrow
(&self)
src/validation.rs:237
Functioncaught_panic_leaves_the_install_slot_free
()
tests/missing_provider.rs:25
Methodcause
(&self)
src/errors.rs:93
Functioncheck_alg_key_alg_conversion
()
src/jwk.rs:833
Functioncheck_hs256
()
src/jwk.rs:703
Functioncheck_jwk_from_decoding_key_ec
()
src/jwk.rs:886
Functioncheck_jwk_from_decoding_key_ed
()
src/jwk.rs:901
Functioncheck_jwk_from_decoding_key_rsa
()
src/jwk.rs:871
Functioncheck_jwkset_default
()
src/jwk.rs:915
Functioncheck_thumbprint
()
src/jwk.rs:795
Functioncheck_thumbprint_bad_key
()
src/jwk.rs:812
Functioncompute_digest
(data: &[u8], hash_function: ThumbprintHash)
src/crypto/rust_crypto/mod.rs:83
Functioncompute_digest
(data: &[u8], hash_function: ThumbprintHash)
src/crypto/aws_lc/mod.rs:73
Functiondangerous_insecure_decode_claims
()
tests/dangerous.rs:67
Functiondangerous_insecure_decode_invalid_claims
()
tests/dangerous.rs:59
Functiondangerous_insecure_decode_invalid_header
()
tests/dangerous.rs:51
Functiondangerous_insecure_decode_invalid_sig
()
tests/dangerous.rs:34
Functiondangerous_insecure_decode_token_invalid_signature
()
tests/hmac.rs:295
Functiondangerous_insecure_decode_valid_jwt
()
tests/dangerous.rs:17
Functiondangerous_insecure_decode_valid_token
()
tests/hmac.rs:288
Functiondecode
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:279
Functiondecode
Validate a received JWS and decode into the header and claims.
src/jws.rs:62
Functiondecode_header_only
()
tests/hmac.rs:279
Functiondecode_token
()
tests/hmac.rs:174
Functiondecode_token_custom_headers
()
tests/hmac.rs:187
Functiondecode_token_invalid_signature
()
tests/hmac.rs:219
Functiondecode_token_missing_parts
()
tests/hmac.rs:207
Functiondecode_token_with_bytes_secret
()
tests/hmac.rs:267
Functiondecode_token_wrong_algorithm
()
tests/hmac.rs:231
Functiondecode_token_wrong_key_family
()
tests/hmac.rs:243
Methoddefault
()
src/validation.rs:162
Methoddefault
Returns a JWT header using the default Algorithm, HS256
src/header.rs:307
Methoddeserialize
( deserializer: D, )
src/validation.rs:205
Methoddeserialize
(deserializer: D)
src/header.rs:57
Methoddeserialize
(deserializer: D)
src/jwk.rs:43
Functiondeserialize_unknown_key_algorithm
()
src/jwk.rs:749
Functiondeserialize_unknown_kty
()
src/jwk.rs:758
Functiondoes_validation_in_right_order
()
src/validation.rs:808
Functiondoesnt_panic_with_leeway_overflow
()
src/validation.rs:847
Functionec_components_from_private_key
( key_content: &[u8], alg: Algorithm, )
src/crypto/rust_crypto/mod.rs:36
Functionec_components_from_private_key
( key_content: &[u8], alg: Algorithm, )
src/crypto/aws_lc/mod.rs:37
next →1–100 of 262, ranked by callers