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

Cleaning-up xml docs #184

Merged
merged 1 commit into from
Feb 10, 2019
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
1 change: 1 addition & 0 deletions JWT.sln.DotSettings
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/ThisQualifier/INSTANCE_MEMBERS_QUALIFY_MEMBERS/@EntryValue">Property</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=HMACSHA/@EntryIndexedValue">HMACSHA</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=RS/@EntryIndexedValue">RS</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=RSA/@EntryIndexedValue">RSA</s:String>
Expand Down
4 changes: 2 additions & 2 deletions src/JWT/Algorithms/IAlgorithmFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ public interface IAlgorithmFactory
/// <summary>
/// Creates an AlgorithmFactory using the provided algorithm name.
/// </summary>
/// <param name="algorithmName">The name of the algorithm.</param>
/// <param name="algorithmName">The name of the algorithm</param>
IJwtAlgorithm Create(string algorithmName);

/// <summary>
/// Creates an AlgorithmFactory using the provided algorithm enum.
/// </summary>
/// <param name="algorithm">The enum value of the algorithm.</param>
/// <param name="algorithm">The enum value of the algorithm</param>
IJwtAlgorithm Create(JwtHashAlgorithm algorithm);
}
}
4 changes: 2 additions & 2 deletions src/JWT/Algorithms/IJwtAlgorithm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ public interface IJwtAlgorithm
/// <summary>
/// Signs provided byte array with provided key.
/// </summary>
/// <param name="key">The key used to sign the data.</param>
/// <param name="bytesToSign">The data to sign.</param>
/// <param name="key">The key used to sign the data</param>
/// <param name="bytesToSign">The data to sign</param>
byte[] Sign(byte[] key, byte[] bytesToSign);

/// <summary>
Expand Down
4 changes: 1 addition & 3 deletions src/JWT/Algorithms/RS256Algorithm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ public sealed class RS256Algorithm : IJwtAlgorithm
/// <summary>
/// Creates an instance using the provided certificate.
/// </summary>
/// <param name="cert"></param>
public RS256Algorithm(X509Certificate2 cert)
{
_cert = cert;
Expand All @@ -40,9 +39,8 @@ public byte[] Sign(byte[] bytesToSign)
/// <summary>
/// Verifies provided byte array with provided signature.
/// </summary>
/// <param name="bytesToSign">The data to verify.</param>
/// <param name="bytesToSign">The data to verify</param>
/// <param name="signature">The signature to verify with</param>
/// <returns></returns>
public bool Verify(byte[] bytesToSign, byte[] signature)
{
var publicKey = GetPublicKey(_cert);
Expand Down
16 changes: 8 additions & 8 deletions src/JWT/Builder/JwtBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ public sealed class JwtBuilder
/// <summary>
/// Add header to the JWT.
/// </summary>
/// <param name="name">Well-known header name.</param>
/// <param name="value">The value you want give to the header.</param>
/// <param name="name">Well-known header name</param>
/// <param name="value">The value you want give to the header</param>
/// <returns>Current builder instance</returns>
public JwtBuilder AddHeader(HeaderName name, string value)
{
Expand Down Expand Up @@ -152,7 +152,7 @@ public JwtBuilder WithAlgorithm(IJwtAlgorithm algorithm)
/// Sets certificate secret.
/// </summary>
/// <remarks>
/// Required to create new token that uses an asymmetric algorithm such as <seealso cref="RS256Algorithm" />.
/// Required to create new token that uses an asymmetric algorithm such as <seealso cref="RS256Algorithm" />
/// </remarks>
/// <returns>Current builder instance</returns>
public JwtBuilder WithSecret(params string[] secrets)
Expand Down Expand Up @@ -186,8 +186,8 @@ public JwtBuilder WithVerifySignature(bool verify)
/// <summary>
/// Builds a token using the supplied dependencies.
/// </summary>
/// <returns>The generated JWT.</returns>
/// <exception cref="InvalidOperationException">Thrown if either algorithm, serializer, encoder or secret is null.</exception>
/// <returns>The generated JWT</returns>
/// <exception cref="InvalidOperationException">Thrown if either algorithm, serializer, encoder or secret is null</exception>
public string Build()
{
if (_encoder == null)
Expand All @@ -201,7 +201,7 @@ public string Build()
/// <summary>
/// Decodes a token using the supplied dependencies.
/// </summary>
/// <param name="token">The JWT.</param>
/// <param name="token">The JWT</param>
/// <returns>The JSON payload</returns>
public string Decode(string token)
{
Expand All @@ -214,8 +214,8 @@ public string Decode(string token)
/// <summary>
/// Decodes a token using the supplied dependencies.
/// </summary>
/// <param name="token">The JWT.</param>
/// <returns>The payload converted to <see cref="T" />.</returns>
/// <param name="token">The JWT</param>
/// <returns>The payload converted to <see cref="T" /></returns>
public T Decode<T>(string token)
{
if (_decoder == null)
Expand Down
4 changes: 2 additions & 2 deletions src/JWT/Builder/JwtData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public JwtData()
}

/// <summary>
/// Creates a new instance of <see cref="JwtData" />.
/// Creates a new instance of <see cref="JwtData" />
/// </summary>
/// <param name="payload">Dictionary that contans the payload</param>
public JwtData(IDictionary<string, object> payload)
Expand All @@ -26,7 +26,7 @@ public JwtData(IDictionary<string, object> payload)
}

/// <summary>
/// Creates a new instance of <see cref="JwtData" />.
/// Creates a new instance of <see cref="JwtData" />
/// </summary>
/// <param name="header">Dictionary that contains the headers</param>
/// <param name="payload">Dictionary that contans the payload</param>
Expand Down
3 changes: 1 addition & 2 deletions src/JWT/IDateTimeProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ namespace JWT
public interface IDateTimeProvider
{
/// <summary>
/// Get the current DateTime.
/// Gets the current DateTime.
/// </summary>
/// <returns></returns>
DateTimeOffset GetNow();
}
}
Loading