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

Fix RFC link #2114

Merged
merged 1 commit into from
Jun 14, 2023
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
28 changes: 14 additions & 14 deletions src/Microsoft.IdentityModel.JsonWebTokens/JsonWebToken.cs
Original file line number Diff line number Diff line change
Expand Up @@ -702,8 +702,8 @@ public virtual IEnumerable<Claim> Claims
/// </summary>
/// <remarks>
/// Used by JWS applications to declare the media type[IANA.MediaTypes] of the secured content (the payload).
/// see: https://datatracker.ietf.org/doc/html/rfc7516#section-4-1-12 (JWE)
/// see: https://datatracker.ietf.org/doc/html/rfc7515#section-4-1-10 (JWS)
/// see: https://datatracker.ietf.org/doc/html/rfc7516#section-4.1.12 (JWE)
/// see: https://datatracker.ietf.org/doc/html/rfc7515#section-4.1.10 (JWS)
/// <para>
/// If the 'cty' claim is not found, an empty string is returned.
/// </para>
Expand All @@ -725,7 +725,7 @@ public string Cty
/// <remarks>
/// Identifies the content encryption algorithm used to perform authenticated encryption
/// on the plaintext to produce the ciphertext and the Authentication Tag.
/// see: https://datatracker.ietf.org/doc/html/rfc7516#section-4-1-2
/// see: https://datatracker.ietf.org/doc/html/rfc7516#section-4.1.2
/// </remarks>
public string Enc
{
Expand Down Expand Up @@ -797,7 +797,7 @@ public T GetPayloadValue<T>(string key)
/// </summary>
/// <remarks>
/// Provides a unique identifier for the JWT.
/// see: https://datatracker.ietf.org/doc/html/rfc7519#section-4-1-7
/// see: https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.7
/// <para>
/// If the 'jti' claim is not found, an empty string is returned.
/// </para>
Expand All @@ -818,7 +818,7 @@ public override string Id
/// </summary>
/// <remarks>
/// Identifies the time at which the JWT was issued.
/// see: https://datatracker.ietf.org/doc/html/rfc7519#section-4-1-6
/// see: https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.6
/// <para>
/// If the 'iat' claim is not found, then <see cref="DateTime.MinValue"/> is returned.
/// </para>
Expand All @@ -839,7 +839,7 @@ public DateTime IssuedAt
/// </summary>
/// <remarks>
/// Identifies the principal that issued the JWT.
/// see: https://datatracker.ietf.org/doc/html/rfc7519#section-4-1-1
/// see: https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.1
/// <para>
/// If the 'iss' claim is not found, an empty string is returned.
/// </para>
Expand All @@ -860,8 +860,8 @@ public override string Issuer
/// </summary>
/// <remarks>
/// 'kid'is a hint indicating which key was used to secure the JWS.
/// see: https://datatracker.ietf.org/doc/html/rfc7515#section-4-1-4 (JWS)
/// see: https://datatracker.ietf.org/doc/html/rfc7516#section-4-1-6 (JWE)
/// see: https://datatracker.ietf.org/doc/html/rfc7515#section-4.1.4 (JWS)
/// see: https://datatracker.ietf.org/doc/html/rfc7516#section-4.1.6 (JWE)
/// <para>
/// If the 'kid' claim is not found, an empty string is returned.
/// </para>
Expand All @@ -881,7 +881,7 @@ public string Kid
/// Gets the 'value' of the 'sub' claim from the payload.
/// </summary>
/// <remarks>
/// see: https://datatracker.ietf.org/doc/html/rfc7519#section-4-1-2
/// see: https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.2
/// Identifies the principal that is the subject of the JWT.
/// <para>
/// If the 'sub' claim is not found, an empty string is returned.
Expand Down Expand Up @@ -991,7 +991,7 @@ public bool TryGetPayloadValue<T>(string key, out T value)
/// </summary>
/// <remarks>
/// Is used by JWT applications to declare the media type.
/// see: https://datatracker.ietf.org/doc/html/rfc7519#section-5-1
/// see: https://datatracker.ietf.org/doc/html/rfc7519#section-5.1
/// <para>
/// If the 'typ' claim is not found, an empty string is returned.
/// </para>
Expand All @@ -1012,7 +1012,7 @@ public string Typ
/// </summary>
/// <remarks>
/// Is the base64url-encoded SHA-1 thumbprint(a.k.a.digest) of the DER encoding of the X.509 certificate used to sign this token.
/// see : https://datatracker.ietf.org/doc/html/rfc7515#section-4-1-7
/// see: https://datatracker.ietf.org/doc/html/rfc7515#section-4.1.7
/// <para>
/// If the 'x5t' claim is not found, an empty string is returned.
/// </para>
Expand All @@ -1033,7 +1033,7 @@ public string X5t
/// </summary>
/// <remarks>
/// Identifies the time before which the JWT MUST NOT be accepted for processing.
/// see: https://datatracker.ietf.org/doc/html/rfc7519#section-4-1-5
/// see: https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.5
/// <para>
/// If the 'nbf' claim is not found, then <see cref="DateTime.MinValue"/> is returned.
/// </para>
Expand All @@ -1054,7 +1054,7 @@ public override DateTime ValidFrom
/// </summary>
/// <remarks>
/// Identifies the expiration time on or after which the JWT MUST NOT be accepted for processing.
/// see: https://datatracker.ietf.org/doc/html/rfc7519#section-4-1-4
/// see: https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.4
/// <para>
/// If the 'exp' claim is not found, then <see cref="DateTime.MinValue"/> is returned.
/// </para>
Expand All @@ -1075,7 +1075,7 @@ public override DateTime ValidTo
/// </summary>
/// <remarks>
/// The "zip" (compression algorithm) applied to the plaintext before encryption, if any.
/// see: https://datatracker.ietf.org/doc/html/rfc7516#section-4-1-3
/// see: https://datatracker.ietf.org/doc/html/rfc7516#section-4.1.3
/// <para>
/// If the 'zip' claim is not found, an empty string is returned.
/// </para>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,49 +9,49 @@ namespace Microsoft.IdentityModel.JsonWebTokens
public struct JwtHeaderParameterNames
{
/// <summary>
/// See: https://datatracker.ietf.org/doc/html/rfc7515#section-4-1-1
/// See: https://datatracker.ietf.org/doc/html/rfc7515#section-4.1.1
/// </summary>
public const string Alg = "alg";

/// <summary>
/// See: https://datatracker.ietf.org/doc/html/rfc7515#section-4-1-10
/// Also: https://datatracker.ietf.org/doc/html/rfc7519#section-5-2
/// See: https://datatracker.ietf.org/doc/html/rfc7515#section-4.1.10
/// Also: https://datatracker.ietf.org/doc/html/rfc7519#section-5.2
/// </summary>
public const string Cty = "cty";

/// <summary>
/// See: https://datatracker.ietf.org/doc/html/rfc7516#section-4-1-2
/// See: https://datatracker.ietf.org/doc/html/rfc7516#section-4.1.2
/// </summary>
public const string Enc = "enc";

/// <summary>
/// See: https://datatracker.ietf.org/doc/html/rfc7518#section-4-7-1-1
/// See: https://datatracker.ietf.org/doc/html/rfc7518#section-4.7.1.1
/// </summary>
public const string IV = "iv";

/// <summary>
/// See: https://datatracker.ietf.org/doc/html/rfc7515#section-4-1-2
/// See: https://datatracker.ietf.org/doc/html/rfc7515#section-4.1.2
/// </summary>
public const string Jku = "jku";

/// <summary>
/// See: https://datatracker.ietf.org/doc/html/rfc7515#section-4-1-3
/// See: https://datatracker.ietf.org/doc/html/rfc7515#section-4.1.3
/// </summary>
public const string Jwk = "jwk";

/// <summary>
/// See: https://datatracker.ietf.org/doc/html/rfc7515#section-4-1-4
/// See: https://datatracker.ietf.org/doc/html/rfc7515#section-4.1.4
/// </summary>
public const string Kid = "kid";

/// <summary>
/// See: https://datatracker.ietf.org/doc/html/rfc7515#section-4-1-9
/// Also: https://datatracker.ietf.org/doc/html/rfc7519#section-5-1
/// See: https://datatracker.ietf.org/doc/html/rfc7515#section-4.1.9
/// Also: https://datatracker.ietf.org/doc/html/rfc7519#section-5.1
/// </summary>
public const string Typ = "typ";

/// <summary>
/// See: https://datatracker.ietf.org/doc/html/rfc7515#section-4-1-6
/// See: https://datatracker.ietf.org/doc/html/rfc7515#section-4.1.6
/// </summary>
public const string X5c = "x5c";

Expand All @@ -61,27 +61,27 @@ public struct JwtHeaderParameterNames
public const string X5t = "x5t";

/// <summary>
/// See: https://datatracker.ietf.org/doc/html/rfc7515#section-4-1-5
/// See: https://datatracker.ietf.org/doc/html/rfc7515#section-4.1.5
/// </summary>
public const string X5u = "x5u";

/// <summary>
/// See: https://datatracker.ietf.org/doc/html/rfc7516#section-4-1-3
/// See: https://datatracker.ietf.org/doc/html/rfc7516#section-4.1.3
/// </summary>
public const string Zip = "zip";

/// <summary>
/// See: https://datatracker.ietf.org/doc/html/rfc7518#section-4-6-1-1
/// See: https://datatracker.ietf.org/doc/html/rfc7518#section-4.6.1.1
/// </summary>
public const string Epk = "epk";

/// <summary>
/// See: https://datatracker.ietf.org/doc/html/rfc7518#section-4-6-1-2
/// See: https://datatracker.ietf.org/doc/html/rfc7518#section-4.6.1.2
/// </summary>
public const string Apu = "apu";

/// <summary>
/// See: https://datatracker.ietf.org/doc/html/rfc7518#section-4-6-1-3
/// See: https://datatracker.ietf.org/doc/html/rfc7518#section-4.6.1.3
/// </summary>
public const string Apv = "apv";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ public virtual void ValidateAuthenticationResponse(OpenIdConnectProtocolValidati
if (validationContext.ValidatedIdToken == null)
throw LogHelper.LogExceptionMessage(new OpenIdConnectProtocolException(LogMessages.IDX21332));

// 'refresh_token' should not be returned from 'authorization_endpoint'. https://datatracker.ietf.org/doc/html/rfc6749#section-4-2-2.
// 'refresh_token' should not be returned from 'authorization_endpoint'. https://datatracker.ietf.org/doc/html/rfc6749#section-4.2.2.
if (!string.IsNullOrEmpty(validationContext.ProtocolMessage.RefreshToken))
throw LogHelper.LogExceptionMessage(new OpenIdConnectProtocolException(LogMessages.IDX21335));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public static class OpenIdConnectResponseType

/// <summary>
/// Defined in OAuth 2.0 spec, included for completion.
/// See: https://datatracker.ietf.org/doc/html/rfc6749#section-11-3-2.
/// See: https://datatracker.ietf.org/doc/html/rfc6749#section-11.3.2.
/// </summary>
public const string Token = "token";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,27 @@ namespace Microsoft.IdentityModel.Protocols.SignedHttpRequest
public static class ConfirmationClaimTypes
{
/// <summary>
/// https://datatracker.ietf.org/doc/html/rfc7800#section-6-1-1
/// https://datatracker.ietf.org/doc/html/rfc7800#section-6.1.1
/// </summary>
public const string Cnf = "cnf";

/// <summary>
/// https://datatracker.ietf.org/doc/html/rfc7800#section-6-2-2
/// https://datatracker.ietf.org/doc/html/rfc7800#section-6.2.2
/// </summary>
public const string Jwk = "jwk";

/// <summary>
/// https://datatracker.ietf.org/doc/html/rfc7800#section-6-2-2
/// https://datatracker.ietf.org/doc/html/rfc7800#section-6.2.2
/// </summary>
public const string Jwe = "jwe";

/// <summary>
/// https://datatracker.ietf.org/doc/html/rfc7800#section-6-2-2
/// https://datatracker.ietf.org/doc/html/rfc7800#section-6.2.2
/// </summary>
public const string Jku = "jku";

/// <summary>
/// https://datatracker.ietf.org/doc/html/rfc7800#section-6-2-2
/// https://datatracker.ietf.org/doc/html/rfc7800#section-6.2.2
/// </summary>
public const string Kid = "kid";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ public static class SignedHttpRequestConstants
/// <summary>
/// The "Authorization" header string.
/// </summary>
/// <remarks>https://datatracker.ietf.org/doc/html/rfc7235#section-4-2</remarks>
/// <remarks>https://datatracker.ietf.org/doc/html/rfc7235#section-4.2</remarks>
public const string AuthorizationHeader = "Authorization";

/// <summary>
/// Authorization header scheme name.
/// </summary>
/// <remarks>https://datatracker.ietf.org/doc/html/draft-ietf-oauth-signed-http-request-03#section-4-1</remarks>
/// <remarks>https://datatracker.ietf.org/doc/html/draft-ietf-oauth-signed-http-request-03#section-4.1</remarks>
public const string AuthorizationHeaderSchemeName = "PoP";

/// <summary>
/// SignedHttpRequest token type.
/// </summary>
/// <remarks>https://datatracker.ietf.org/doc/html/draft-ietf-oauth-signed-http-request-03#section-6-1</remarks>
/// <remarks>https://datatracker.ietf.org/doc/html/draft-ietf-oauth-signed-http-request-03#section-6.1</remarks>
public const string TokenType = "pop";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public class SignedHttpRequestDescriptor
/// </summary>
/// <remarks>
/// <paramref name="accessToken"/> has to contain the 'cnf' claim so that PoP key can be resolved on the validation side.
/// https://datatracker.ietf.org/doc/html/rfc7800#section-3-1
/// https://datatracker.ietf.org/doc/html/rfc7800#section-3.1
/// Default <see cref="SignedHttpRequestCreationParameters"/> and <see cref="CallContext"/> will be created.
/// </remarks>
/// <param name="accessToken">An access token that contains the 'cnf' claim.</param>
Expand All @@ -56,7 +56,7 @@ public SignedHttpRequestDescriptor(string accessToken, HttpRequestData httpReque
/// </summary>
/// <remarks>
/// <paramref name="accessToken"/> has to contain the 'cnf' claim so that PoP key can be resolved on the validation side.
/// https://datatracker.ietf.org/doc/html/rfc7800#section-3-1
/// https://datatracker.ietf.org/doc/html/rfc7800#section-3.1
/// </remarks>
/// <param name="accessToken">An access token that contains the 'cnf' claim.</param>
/// <param name="httpRequestData">A structure that represents an outgoing http request.</param>
Expand Down
Loading