Skip to content

Commit 10fd5ce

Browse files
authored
Adds xml docs for HttpSys (#235)
* Adds xml docs for the HttpSys extension. * Adds a space after xml doc line starters `///`.
1 parent e952d8e commit 10fd5ce

File tree

2 files changed

+22
-13
lines changed

2 files changed

+22
-13
lines changed

src/Saturn.Extensions.Authorization/OAuth.fs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ open Newtonsoft.Json.Linq
1818
let private addCookie state (c : AuthenticationBuilder) = if not state.CookiesAlreadyAdded then c.AddCookie() |> ignore
1919

2020
type Saturn.Application.ApplicationBuilder with
21-
///Enables default Google OAuth authentication.
22-
///`jsonToClaimMap` should contain sequance of tuples where first element is a name of the of the key in JSON object and second element is a name of the claim.
23-
///For example: `["id", ClaimTypes.NameIdentifier; "displayName", ClaimTypes.Name]` where `id` and `displayName` are names of fields in the Google JSON response (https://developers.google.com/+/web/api/rest/latest/people#resource).
21+
/// Enables default Google OAuth authentication.
22+
/// `jsonToClaimMap` should contain sequance of tuples where first element is a name of the of the key in JSON object and second element is a name of the claim.
23+
/// For example: `["id", ClaimTypes.NameIdentifier; "displayName", ClaimTypes.Name]` where `id` and `displayName` are names of fields in the Google JSON response (https://developers.google.com/+/web/api/rest/latest/people#resource).
2424
[<CustomOperation("use_google_oauth")>]
2525
member __.UseGoogleAuth(state: ApplicationState, clientId : string, clientSecret : string, callbackPath : string, jsonToClaimMap : (string * string) seq) =
2626
let middleware (app : IApplicationBuilder) =
@@ -51,7 +51,7 @@ type Saturn.Application.ApplicationBuilder with
5151
CookiesAlreadyAdded = true
5252
}
5353

54-
///Enables Google OAuth authentication with custom configuration
54+
/// Enables Google OAuth authentication with custom configuration
5555
[<CustomOperation("use_google_oauth_with_config")>]
5656
member __.UseGoogleAuthWithConfig(state: ApplicationState, (config : Authentication.Google.GoogleOptions -> unit) ) =
5757
let middleware (app : IApplicationBuilder) =
@@ -72,9 +72,9 @@ type Saturn.Application.ApplicationBuilder with
7272
CookiesAlreadyAdded = true
7373
}
7474

75-
///Enables default GitHub OAuth authentication.
76-
///`jsonToClaimMap` should contain sequance of tuples where first element is a name of the of the key in JSON object and second element is a name of the claim.
77-
///For example: `["login", "githubUsername"; "name", "fullName"]` where `login` and `name` are names of fields in GitHub JSON response (https://developer.github.com/v3/users/#get-the-authenticated-user).
75+
/// Enables default GitHub OAuth authentication.
76+
/// `jsonToClaimMap` should contain sequance of tuples where first element is a name of the of the key in JSON object and second element is a name of the claim.
77+
/// For example: `["login", "githubUsername"; "name", "fullName"]` where `login` and `name` are names of fields in GitHub JSON response (https://developer.github.com/v3/users/#get-the-authenticated-user).
7878
[<CustomOperation("use_github_oauth")>]
7979
member __.UseGithubAuth(state: ApplicationState, clientId : string, clientSecret : string, callbackPath : string, jsonToClaimMap : (string * string) seq) =
8080
let middleware (app : IApplicationBuilder) =
@@ -107,7 +107,7 @@ type Saturn.Application.ApplicationBuilder with
107107
CookiesAlreadyAdded = true
108108
}
109109

110-
///Enables GitHub OAuth authentication with custom configuration
110+
/// Enables GitHub OAuth authentication with custom configuration
111111
[<CustomOperation("use_github_oauth_with_config")>]
112112
member __.UseGithubAuthWithConfig(state: ApplicationState, (config : Authentication.OAuth.OAuthOptions -> unit) ) =
113113
let middleware (app : IApplicationBuilder) =
@@ -128,10 +128,10 @@ type Saturn.Application.ApplicationBuilder with
128128
CookiesAlreadyAdded = true
129129
}
130130

131-
///Enalbes default Azure AD OAuth authentication.
132-
///`scopes` must be at least on of the scopes defined in https://docs.microsoft.com/en-us/graph/permissions-reference, for instance "User.Read".
133-
///`jsonToClaimMap` should contain sequance of tuples where first element is a name of the of the key in JSON object and second element is a name of the claim.
134-
///For example: `["name", "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name" ]` where `name` is the names of a field in Azure AD's JSON response (see https://docs.microsoft.com/en-us/azure/active-directory/develop/id-tokens or inspect tokens with https://jwt.ms).
131+
/// Enalbes default Azure AD OAuth authentication.
132+
/// `scopes` must be at least on of the scopes defined in https://docs.microsoft.com/en-us/graph/permissions-reference, for instance "User.Read".
133+
/// `jsonToClaimMap` should contain sequance of tuples where first element is a name of the of the key in JSON object and second element is a name of the claim.
134+
/// For example: `["name", "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name" ]` where `name` is the names of a field in Azure AD's JSON response (see https://docs.microsoft.com/en-us/azure/active-directory/develop/id-tokens or inspect tokens with https://jwt.ms).
135135
[<CustomOperation("use_azuread_oauth")>]
136136
member __.UseAzureADAuth(state: ApplicationState, tenantId : string, clientId : string, clientSecret: string, callbackPath : string, scopes : string seq, jsonToClaimMap : (string * string) seq) =
137137
let middleware (app : IApplicationBuilder) =
@@ -165,7 +165,7 @@ type Saturn.Application.ApplicationBuilder with
165165
CookiesAlreadyAdded = true
166166
}
167167

168-
///Enables AzureAD OAuth authentication with custom configuration
168+
/// Enables AzureAD OAuth authentication with custom configuration
169169
[<CustomOperation("use_azuread_oauth_with_config")>]
170170
member __.UseAzureADAuthWithConfig(state: ApplicationState, (config : Authentication.OAuth.OAuthOptions -> unit) ) =
171171
let middleware (app : IApplicationBuilder) =

src/Saturn.Extensions.HttpSys/Saturn.HttpSys.fs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ open Microsoft.AspNetCore.Server.HttpSys
77

88
type Saturn.Application.ApplicationBuilder with
99

10+
/// HTTP.sys is a web server for ASP.NET Core that only runs on Windows. HTTP.sys is an alternative to Kestrel server and offers some features that Kestrel doesn't provide.
11+
/// (https://docs.microsoft.com/en-us/aspnet/core/fundamentals/servers/httpsys)
12+
/// This operation switches hosting to the HTTP.sys server.
1013
[<CustomOperation("use_httpsys")>]
1114
member __.UseHttpSys(state) =
1215
let host (builder: IWebHostBuilder) =
@@ -15,6 +18,9 @@ type Saturn.Application.ApplicationBuilder with
1518
HostConfigs = host::state.HostConfigs
1619
}
1720

21+
/// HTTP.sys is a web server for ASP.NET Core that only runs on Windows. HTTP.sys is an alternative to Kestrel server and offers some features that Kestrel doesn't provide.
22+
/// (https://docs.microsoft.com/en-us/aspnet/core/fundamentals/servers/httpsys)
23+
/// This operation switches hosting to the HTTP.sys server and takes additional config.
1824
[<CustomOperation("use_httpsys_with_config")>]
1925
member __.UseHttpSysWithConfig(state, config) =
2026
let host (builder: IWebHostBuilder) =
@@ -23,6 +29,9 @@ type Saturn.Application.ApplicationBuilder with
2329
HostConfigs = host::state.HostConfigs
2430
}
2531

32+
/// HTTP.sys is a web server for ASP.NET Core that only runs on Windows. HTTP.sys is an alternative to Kestrel server and offers some features that Kestrel doesn't provide.
33+
/// (https://docs.microsoft.com/en-us/aspnet/core/fundamentals/servers/httpsys)
34+
/// This operation switches hosting to the HTTP.sys server and enables Windows Auth (NTLM/Negotiate).
2635
[<CustomOperation("use_httpsys_windows_auth")>]
2736
member __.UserHttpSysWindowsAuth(state, allowAnonymous: bool) =
2837
let host (builder: IWebHostBuilder) =

0 commit comments

Comments
 (0)