Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix some documentation and links #117

Merged
merged 1 commit into from
Jan 30, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading