Skip to content

Commit

Permalink
chore: fix some documentation and links
Browse files Browse the repository at this point in the history
  • Loading branch information
Erik1000 committed Jan 27, 2025
1 parent a28c292 commit c8970d3
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ use crate::{
/// A [`JoseHeader`] can store parameters in two ways:
///
/// * [protected](HeaderValue::Protected): Parameters stored in the protected
/// part of a [`JoseHeader`] can not be modified without the knowledge of the
/// cryptographic key that was used to protected the payload.
/// part of a [`JoseHeader`] **cannot** be modified without knowledge of the
/// cryptographic key that was used to protect the payload.
///
/// * [unprotected](HeaderValue::Unprotected): Parameters stored in the
/// unprotected part of a [`JoseHeader`] **can** be modified by anybody and
/// changes cannot be detected. You therefore cannot rely or trust them.
/// *changes cannot be detected*. You therefore *MUST NOT* trust them.
///
/// Since most parameters are allowed in both of the two header parts, each
/// parameter is wrapped in a [`HeaderValue<T>`] that specifies the part in
Expand Down
2 changes: 1 addition & 1 deletion src/header/value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ impl<T> HeaderValue<Option<T>> {
}

impl<T, E> HeaderValue<Result<T, E>> {
/// Transpose a [`HeaderValue<Result<T, E>>] into
/// Transpose a [`HeaderValue<Result<T, E>>`] into
/// [`Result<HeaderValue<`T`>, E>`]
///
/// # Errors
Expand Down
2 changes: 1 addition & 1 deletion src/jwk/rsa/signer_verifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ impl FromKey<super::RsaPublicKey> for RsaVerifier {
impl FromKey<super::RsaPrivateKey> for RsaVerifier {
type Error = InvalidSigningAlgorithmError;

/// Create a [`Verifier`](crate::jws::Verifier) from the private key by
/// Create a [`Verifier`] from the private key by
/// turning it into the public key and dropping the private parts afterwards
fn from_key(value: super::RsaPrivateKey, alg: JsonWebAlgorithm) -> Result<Self, Self::Error> {
Self::from_key(super::RsaPublicKey(value.0.to_public_key()), alg)
Expand Down
2 changes: 1 addition & 1 deletion src/jws/sign.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ impl<SIG: AsRef<[u8]>, S: Signer<SIG>> Signer<SIG> for SignerWithoutKeyId<S> {
}

/// An error returned if something expected a different
/// [`JsonWebAlgorithm`](crate::jwa::JsonWebAlgorithm)
/// [`JsonWebAlgorithm`]
#[derive(Debug, thiserror_no_std::Error, PartialEq, Eq)]
#[error("Invalid algorithm")]
pub struct InvalidSigningAlgorithmError;
Expand Down
2 changes: 1 addition & 1 deletion src/jwt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use crate::{
/// A JSON Web Token (JWT) as defined in [RFC 7519].
///
/// Since a JWT is only allowed to be serialized in the compact format, the
/// `F` type parameter is fixed to [`Compact`](format::Compact) in this type
/// `F` type parameter is fixed to [`Compact`] in this type
/// alias.
///
/// [RFC 7519]: <https://datatracker.ietf.org/doc/html/rfc7519>
Expand Down

0 comments on commit c8970d3

Please sign in to comment.