Skip to content

Commit 8b741bd

Browse files
authored
Add docs for Negotiate, OAuth, OpenIdConnect (#26610)
* Add docs for Negotiate, OAuth, OpenIdConnect Contributes to #26397
1 parent fda7d1d commit 8b741bd

38 files changed

+416
-61
lines changed

src/Security/Authentication/MicrosoftAccount/src/Microsoft.AspNetCore.Authentication.MicrosoftAccount.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
44
<Description>ASP.NET Core middleware that enables an application to support the Microsoft Account authentication workflow.</Description>

src/Security/Authentication/Negotiate/src/Events/AuthenticatedContext.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ public class AuthenticatedContext : ResultContext<NegotiateOptions>
1313
/// <summary>
1414
/// Creates a new <see cref="AuthenticatedContext"/>.
1515
/// </summary>
16-
/// <param name="context"></param>
17-
/// <param name="scheme"></param>
18-
/// <param name="options"></param>
16+
/// <inheritdoc />
1917
public AuthenticatedContext(
2018
HttpContext context,
2119
AuthenticationScheme scheme,

src/Security/Authentication/Negotiate/src/Events/AuthenticationFailedContext.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@ public class AuthenticationFailedContext : RemoteAuthenticationContext<Negotiate
1414
/// <summary>
1515
/// Creates a <see cref="AuthenticationFailedContext"/>.
1616
/// </summary>
17-
/// <param name="context"></param>
18-
/// <param name="scheme"></param>
19-
/// <param name="options"></param>
17+
/// <inheritdoc />
2018
public AuthenticationFailedContext(
2119
HttpContext context,
2220
AuthenticationScheme scheme,

src/Security/Authentication/Negotiate/src/Events/ChallengeContext.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,7 @@ public class ChallengeContext : PropertiesContext<NegotiateOptions>
1414
/// <summary>
1515
/// Creates a new <see cref="ChallengeContext"/>.
1616
/// </summary>
17-
/// <param name="context"></param>
18-
/// <param name="scheme"></param>
19-
/// <param name="options"></param>
20-
/// <param name="properties"></param>
17+
/// <inheritdoc />
2118
public ChallengeContext(
2219
HttpContext context,
2320
AuthenticationScheme scheme,
@@ -26,7 +23,8 @@ public ChallengeContext(
2623
: base(context, scheme, options, properties) { }
2724

2825
/// <summary>
29-
/// If true, will skip any default logic for this challenge.
26+
/// Gets a value that determines if this challenge was handled.
27+
/// If <see langword="true"/>, will skip any default logic for this challenge.
3028
/// </summary>
3129
public bool Handled { get; private set; }
3230

src/Security/Authentication/Negotiate/src/Events/LdapContext.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,7 @@ public class LdapContext : ResultContext<NegotiateOptions>
1313
/// <summary>
1414
/// Creates a new <see cref="LdapContext"/>.
1515
/// </summary>
16-
/// <param name="context"></param>
17-
/// <param name="scheme"></param>
18-
/// <param name="options"></param>
19-
/// <param name="settings"></param>
16+
/// <inheritdoc />
2017
public LdapContext(
2118
HttpContext context,
2219
AuthenticationScheme scheme,

src/Security/Authentication/Negotiate/src/LdapSettings.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@ public class LdapSettings
7676

7777
internal MemoryCache ClaimsCache { get; set; }
7878

79+
/// <summary>
80+
/// Validates the <see cref="LdapSettings"/>.
81+
/// </summary>
7982
public void Validate()
8083
{
8184
if (EnableLdapClaimResolution)

src/Security/Authentication/Negotiate/src/Microsoft.AspNetCore.Authentication.Negotiate.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<PropertyGroup>
44
<Description>ASP.NET Core authentication handler used to authenticate requests using Negotiate, Kerberos, or NTLM.</Description>
55
<TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
6+
<NoWarn>$(NoWarn.Replace('1591', ''))</NoWarn>
67
<GenerateDocumentationFile>true</GenerateDocumentationFile>
78
<PackageTags>aspnetcore;authentication;security</PackageTags>
89
</PropertyGroup>

src/Security/Authentication/Negotiate/src/NegotiateExtensions.cs

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,23 @@ namespace Microsoft.Extensions.DependencyInjection
1717
public static class NegotiateExtensions
1818
{
1919
/// <summary>
20-
/// Adds Negotiate authentication.
20+
/// Configures the <see cref="AuthenticationBuilder"/> to use Negotiate (also known as Windows, Kerberos, or NTLM) authentication
21+
/// using the default scheme from <see cref="NegotiateDefaults.AuthenticationScheme"/>.
22+
/// <para>
23+
/// This authentication handler supports Kerberos on Windows and Linux servers.
24+
/// </para>
2125
/// </summary>
2226
/// <param name="builder">The <see cref="AuthenticationBuilder"/>.</param>
2327
/// <returns>The original builder.</returns>
2428
public static AuthenticationBuilder AddNegotiate(this AuthenticationBuilder builder)
2529
=> builder.AddNegotiate(NegotiateDefaults.AuthenticationScheme, _ => { });
2630

2731
/// <summary>
28-
/// Adds and configures Negotiate authentication.
32+
/// Configures the <see cref="AuthenticationBuilder"/> to use Negotiate (also known as Windows, Kerberos, or NTLM) authentication
33+
/// using the default scheme. The default scheme is specified by <see cref="NegotiateDefaults.AuthenticationScheme"/>.
34+
/// <para>
35+
/// This authentication handler supports Kerberos on Windows and Linux servers.
36+
/// </para>
2937
/// </summary>
3038
/// <param name="builder">The <see cref="AuthenticationBuilder"/>.</param>
3139
/// <param name="configureOptions">Allows for configuring the authentication handler.</param>
@@ -34,7 +42,11 @@ public static AuthenticationBuilder AddNegotiate(this AuthenticationBuilder buil
3442
=> builder.AddNegotiate(NegotiateDefaults.AuthenticationScheme, configureOptions);
3543

3644
/// <summary>
37-
/// Adds and configures Negotiate authentication.
45+
/// Configures the <see cref="AuthenticationBuilder"/> to use Negotiate (also known as Windows, Kerberos, or NTLM) authentication
46+
/// using the specified authentication scheme.
47+
/// <para>
48+
/// This authentication handler supports Kerberos on Windows and Linux servers.
49+
/// </para>
3850
/// </summary>
3951
/// <param name="builder">The <see cref="AuthenticationBuilder"/>.</param>
4052
/// <param name="authenticationScheme">The scheme name used to identify the authentication handler internally.</param>
@@ -44,7 +56,11 @@ public static AuthenticationBuilder AddNegotiate(this AuthenticationBuilder buil
4456
=> builder.AddNegotiate(authenticationScheme, displayName: null, configureOptions: configureOptions);
4557

4658
/// <summary>
47-
/// Adds and configures Negotiate authentication.
59+
/// Configures the <see cref="AuthenticationBuilder"/> to use Negotiate (also known as Windows, Kerberos, or NTLM) authentication
60+
/// using the specified authentication scheme.
61+
/// <para>
62+
/// This authentication handler supports Kerberos on Windows and Linux servers.
63+
/// </para>
4864
/// </summary>
4965
/// <param name="builder">The <see cref="AuthenticationBuilder"/>.</param>
5066
/// <param name="authenticationScheme">The scheme name used to identify the authentication handler internally.</param>

src/Security/Authentication/Negotiate/src/NegotiateHandler.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,7 @@ public class NegotiateHandler : AuthenticationHandler<NegotiateOptions>, IAuthen
3434
/// <summary>
3535
/// Creates a new <see cref="NegotiateHandler"/>
3636
/// </summary>
37-
/// <param name="options"></param>
38-
/// <param name="logger"></param>
39-
/// <param name="encoder"></param>
40-
/// <param name="clock"></param>
37+
/// <inheritdoc />
4138
public NegotiateHandler(IOptionsMonitor<NegotiateOptions> options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock)
4239
: base(options, logger, encoder, clock)
4340
{ }
@@ -63,7 +60,7 @@ public NegotiateHandler(IOptionsMonitor<NegotiateOptions> options, ILoggerFactor
6360
/// <summary>
6461
/// Intercepts incomplete Negotiate authentication handshakes and continues or completes them.
6562
/// </summary>
66-
/// <returns>True if a response was generated, false otherwise.</returns>
63+
/// <returns><see langword="true" /> if a response was generated, otherwise <see langword="false"/>.</returns>
6764
public async Task<bool> HandleRequestAsync()
6865
{
6966
AuthPersistence persistence = null;

src/Security/Authentication/Negotiate/src/NegotiateOptions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ public class NegotiateOptions : AuthenticationSchemeOptions
2424
/// <summary>
2525
/// Indicates if Kerberos credentials should be persisted and re-used for subsquent anonymous requests.
2626
/// This option must not be used if connections may be shared by requests from different users.
27-
/// The default is false.
2827
/// </summary>
28+
/// <value>Defaults to <see langword="false"/>.</value>
2929
public bool PersistKerberosCredentials { get; set; } = false;
3030

3131
/// <summary>
3232
/// Indicates if NTLM credentials should be persisted and re-used for subsquent anonymous requests.
3333
/// This option must not be used if connections may be shared by requests from different users.
34-
/// The default is true.
3534
/// </summary>
35+
/// <value>Defaults to <see langword="true"/>.</value>
3636
public bool PersistNtlmCredentials { get; set; } = true;
3737

3838
/// <summary>

0 commit comments

Comments
 (0)