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 XML documentation syntax errors #1730

Merged
merged 3 commits into from
Jan 28, 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
7 changes: 5 additions & 2 deletions identity-server/hosts/AspNetIdentity/Pages/Telemetry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ public static class TagValues
/// </summary>
/// <param name="clientId">Client id</param>
/// <param name="scopes">Scope names. Each element is added on it's own to the counter</param>
/// <param name="remember">Remember consent granted</param>
public static void ConsentGranted(string clientId, IEnumerable<string> scopes, bool remember)
{
ArgumentNullException.ThrowIfNull(scopes);
Expand Down Expand Up @@ -119,13 +120,15 @@ public static void GrantsRevoked(string? clientId)
/// Helper method to increase <see cref="Counters.UserLogin"/> counter.
/// </summary>
/// <param name="clientId">Client Id, if available</param>
/// <param name="idp">Identity provider</param>
public static void UserLogin(string? clientId, string idp)
=> UserLoginCounter.Add(1, new(Tags.Client, clientId), new(Tags.Idp, idp));

/// <summary>
/// Helper method to increase <see cref="Counters.UserLogin" counter on failure.
/// Helper method to increase <see cref="Counters.UserLogin"/> counter on failure.
/// </summary>
/// <param name="clientId">Client Id, if available</param>
/// <param name="idp">Identity provider</param>
/// <param name="error">Error message</param>
public static void UserLoginFailure(string? clientId, string idp, string error)
=> UserLoginCounter.Add(1, new(Tags.Client, clientId), new(Tags.Idp, idp), new(Tags.Error, error));
Expand All @@ -139,4 +142,4 @@ public static void UserLoginFailure(string? clientId, string idp, string error)
public static void UserLogout(string? idp)
=> UserLogoutCounter.Add(1, tag: new(Tags.Idp, idp));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ protected override async Task<IStepResult> AddClientId(DynamicClientRegistration
protected override async Task<(Secret, string)> GenerateSecret(DynamicClientRegistrationContext context)
{
if(context.Request.Extensions.TryGetValue("client_secret", out var secretParam))
{
var plainText = secretParam.ToString();
ArgumentNullException.ThrowIfNull(plainText);
var secret = new Secret(plainText.Sha256());

return (secret, plainText);
}
return await base.GenerateSecret(context);
{
var plainText = secretParam.ToString();
ArgumentNullException.ThrowIfNull(plainText);
var secret = new Secret(plainText.Sha256());

return (secret, plainText);
}
return await base.GenerateSecret(context);

}
}
7 changes: 5 additions & 2 deletions identity-server/hosts/Configuration/Pages/Telemetry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ public static class TagValues
/// </summary>
/// <param name="clientId">Client id</param>
/// <param name="scopes">Scope names. Each element is added on it's own to the counter</param>
/// <param name="remember">Remember consent granted</param>
public static void ConsentGranted(string clientId, IEnumerable<string> scopes, bool remember)
{
ArgumentNullException.ThrowIfNull(scopes);
Expand Down Expand Up @@ -119,13 +120,15 @@ public static void GrantsRevoked(string? clientId)
/// Helper method to increase <see cref="Counters.UserLogin"/> counter.
/// </summary>
/// <param name="clientId">Client Id, if available</param>
/// <param name="idp">Identity provider</param>
public static void UserLogin(string? clientId, string idp)
=> UserLoginCounter.Add(1, new(Tags.Client, clientId), new(Tags.Idp, idp));

/// <summary>
/// Helper method to increase <see cref="Counters.UserLogin" counter on failure.
/// Helper method to increase <see cref="Counters.UserLogin" /> counter on failure.
/// </summary>
/// <param name="clientId">Client Id, if available</param>
/// <param name="idp">Identity provider</param>
/// <param name="error">Error message</param>
public static void UserLoginFailure(string? clientId, string idp, string error)
=> UserLoginCounter.Add(1, new(Tags.Client, clientId), new(Tags.Idp, idp), new(Tags.Error, error));
Expand All @@ -139,4 +142,4 @@ public static void UserLoginFailure(string? clientId, string idp, string error)
public static void UserLogout(string? idp)
=> UserLogoutCounter.Add(1, tag: new(Tags.Idp, idp));
}
}
}
7 changes: 5 additions & 2 deletions identity-server/hosts/EntityFramework/Pages/Telemetry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ public static class TagValues
/// </summary>
/// <param name="clientId">Client id</param>
/// <param name="scopes">Scope names. Each element is added on it's own to the counter</param>
/// <param name="remember">Remember consent granted</param>
public static void ConsentGranted(string clientId, IEnumerable<string> scopes, bool remember)
{
ArgumentNullException.ThrowIfNull(scopes);
Expand Down Expand Up @@ -119,13 +120,15 @@ public static void GrantsRevoked(string? clientId)
/// Helper method to increase <see cref="Counters.UserLogin"/> counter.
/// </summary>
/// <param name="clientId">Client Id, if available</param>
/// <param name="idp">Identity provider</param>
public static void UserLogin(string? clientId, string idp)
=> UserLoginCounter.Add(1, new(Tags.Client, clientId), new(Tags.Idp, idp));

/// <summary>
/// Helper method to increase <see cref="Counters.UserLogin"> counter on failure.
/// Helper method to increase <see cref="Counters.UserLogin"/> counter on failure.
/// </summary>
/// <param name="clientId">Client Id, if available</param>
/// <param name="idp">Identity provider</param>
/// <param name="error">Error message</param>
public static void UserLoginFailure(string? clientId, string idp, string error)
=> UserLoginCounter.Add(1, new(Tags.Client, clientId), new(Tags.Idp, idp), new(Tags.Error, error));
Expand All @@ -139,4 +142,4 @@ public static void UserLoginFailure(string? clientId, string idp, string error)
public static void UserLogout(string? idp)
=> UserLogoutCounter.Add(1, tag: new(Tags.Idp, idp));
}
}
}
7 changes: 5 additions & 2 deletions identity-server/hosts/main/Pages/Telemetry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ public static class TagValues
/// </summary>
/// <param name="clientId">Client id</param>
/// <param name="scopes">Scope names. Each element is added on it's own to the counter</param>
/// <param name="remember">Remember consent granted</param>
public static void ConsentGranted(string clientId, IEnumerable<string> scopes, bool remember)
{
ArgumentNullException.ThrowIfNull(scopes);
Expand Down Expand Up @@ -119,13 +120,15 @@ public static void GrantsRevoked(string? clientId)
/// Helper method to increase <see cref="Counters.UserLogin"/> counter.
/// </summary>
/// <param name="clientId">Client Id, if available</param>
/// <param name="idp">Identity provider</param>
public static void UserLogin(string? clientId, string idp)
=> UserLoginCounter.Add(1, new(Tags.Client, clientId), new(Tags.Idp, idp));

/// <summary>
/// Helper method to increase <see cref="Counters.UserLogin" counter on failure.
/// Helper method to increase <see cref="Counters.UserLogin"/> counter on failure.
/// </summary>
/// <param name="clientId">Client Id, if available</param>
/// <param name="idp">Identity provider</param>
/// <param name="error">Error message</param>
public static void UserLoginFailure(string? clientId, string idp, string error)
=> UserLoginCounter.Add(1, new(Tags.Client, clientId), new(Tags.Idp, idp), new(Tags.Error, error));
Expand All @@ -139,4 +142,4 @@ public static void UserLoginFailure(string? clientId, string idp, string error)
public static void UserLogout(string? idp)
=> UserLogoutCounter.Add(1, tag: new(Tags.Idp, idp));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ public static class TagValues
/// </summary>
/// <param name="clientId">Client id</param>
/// <param name="scopes">Scope names. Each element is added on it's own to the counter</param>
/// <param name="remember">Remember consent granted</param>
public static void ConsentGranted(string clientId, IEnumerable<string> scopes, bool remember)
{
ArgumentNullException.ThrowIfNull(scopes);
Expand All @@ -90,7 +91,7 @@ public static void ConsentGranted(string clientId, IEnumerable<string> scopes, b
}

/// <summary>
/// Helper method to increase <see cref="Counters.ConsentDenied"/> counter. The scopes
/// Helper method to increase <see cref="Counters.Consent"/> counter. The scopes
/// are expanded and called one by one to not cause a combinatory explosion of scopes.
/// </summary>
/// <param name="clientId">Client id</param>
Expand Down Expand Up @@ -119,13 +120,15 @@ public static void GrantsRevoked(string? clientId)
/// Helper method to increase <see cref="Counters.UserLogin"/> counter.
/// </summary>
/// <param name="clientId">Client Id, if available</param>
/// <param name="idp">Identity provider</param>
public static void UserLogin(string? clientId, string idp)
=> UserLoginCounter.Add(1, new(Tags.Client, clientId), new(Tags.Idp, idp));

/// <summary>
/// Helper method to increase <see cref="Counters.UserLogin" counter on failure.
/// Helper method to increase <see cref="Counters.UserLogin"/> counter on failure.
/// </summary>
/// <param name="clientId">Client Id, if available</param>
/// <param name="idp">Identity provider</param>
/// <param name="error">Error message</param>
public static void UserLoginFailure(string? clientId, string idp, string error)
=> UserLoginCounter.Add(1, new(Tags.Client, clientId), new(Tags.Idp, idp), new(Tags.Error, error));
Expand All @@ -139,4 +142,4 @@ public static void UserLoginFailure(string? clientId, string idp, string error)
public static void UserLogout(string? idp)
=> UserLogoutCounter.Add(1, tag: new(Tags.Idp, idp));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ public static class TagValues
/// </summary>
/// <param name="clientId">Client id</param>
/// <param name="scopes">Scope names. Each element is added on it's own to the counter</param>
/// <param name="remember">Remember consent granted</param>
public static void ConsentGranted(string clientId, IEnumerable<string> scopes, bool remember)
{
ArgumentNullException.ThrowIfNull(scopes);
Expand All @@ -90,7 +91,7 @@ public static void ConsentGranted(string clientId, IEnumerable<string> scopes, b
}

/// <summary>
/// Helper method to increase <see cref="Counters.ConsentDenied"/> counter. The scopes
/// Helper method to increase <see cref="Counters.Consent"/> counter. The scopes
/// are expanded and called one by one to not cause a combinatory explosion of scopes.
/// </summary>
/// <param name="clientId">Client id</param>
Expand Down Expand Up @@ -119,13 +120,15 @@ public static void GrantsRevoked(string? clientId)
/// Helper method to increase <see cref="Counters.UserLogin"/> counter.
/// </summary>
/// <param name="clientId">Client Id, if available</param>
/// <param name="idp">Identity provider</param>
public static void UserLogin(string? clientId, string idp)
=> UserLoginCounter.Add(1, new(Tags.Client, clientId), new(Tags.Idp, idp));

/// <summary>
/// Helper method to increase <see cref="Counters.UserLogin" counter on failure.
/// Helper method to increase <see cref="Counters.UserLogin"/> counter on failure.
/// </summary>
/// <param name="clientId">Client Id, if available</param>
/// <param name="idp">Identity provider</param>
/// <param name="error">Error message</param>
public static void UserLoginFailure(string? clientId, string idp, string error)
=> UserLoginCounter.Add(1, new(Tags.Client, clientId), new(Tags.Idp, idp), new(Tags.Error, error));
Expand All @@ -139,4 +142,4 @@ public static void UserLoginFailure(string? clientId, string idp, string error)
public static void UserLogout(string? idp)
=> UserLogoutCounter.Add(1, tag: new(Tags.Idp, idp));
}
}
}
9 changes: 6 additions & 3 deletions templates/src/IdentityServerInMem/Pages/Telemetry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ public static class TagValues
/// </summary>
/// <param name="clientId">Client id</param>
/// <param name="scopes">Scope names. Each element is added on it's own to the counter</param>
/// <param name="remember">Remember consent granted</param>
public static void ConsentGranted(string clientId, IEnumerable<string> scopes, bool remember)
{
ArgumentNullException.ThrowIfNull(scopes);
Expand All @@ -90,7 +91,7 @@ public static void ConsentGranted(string clientId, IEnumerable<string> scopes, b
}

/// <summary>
/// Helper method to increase <see cref="Counters.ConsentDenied"/> counter. The scopes
/// Helper method to increase <see cref="Counters.Consent"/> counter. The scopes
/// are expanded and called one by one to not cause a combinatory explosion of scopes.
/// </summary>
/// <param name="clientId">Client id</param>
Expand Down Expand Up @@ -119,13 +120,15 @@ public static void GrantsRevoked(string? clientId)
/// Helper method to increase <see cref="Counters.UserLogin"/> counter.
/// </summary>
/// <param name="clientId">Client Id, if available</param>
/// <param name="idp">Identity provider</param>
public static void UserLogin(string? clientId, string idp)
=> UserLoginCounter.Add(1, new(Tags.Client, clientId), new(Tags.Idp, idp));

/// <summary>
/// Helper method to increase <see cref="Counters.UserLogin" counter on failure.
/// Helper method to increase <see cref="Counters.UserLogin"/> counter on failure.
/// </summary>
/// <param name="clientId">Client Id, if available</param>
/// <param name="idp">Identity provider</param>
/// <param name="error">Error message</param>
public static void UserLoginFailure(string? clientId, string idp, string error)
=> UserLoginCounter.Add(1, new(Tags.Client, clientId), new(Tags.Idp, idp), new(Tags.Error, error));
Expand All @@ -139,4 +142,4 @@ public static void UserLoginFailure(string? clientId, string idp, string error)
public static void UserLogout(string? idp)
=> UserLogoutCounter.Add(1, tag: new(Tags.Idp, idp));
}
}
}
Loading