Skip to content

Commit

Permalink
api docs (authorization): rephrase comment and fix typo (#365)
Browse files Browse the repository at this point in the history
  • Loading branch information
draptik authored Jan 3, 2023
1 parent 638b2cf commit f22bca0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/Saturn.Extensions.Authorization/OAuth.fs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ let private addCookie state (c : AuthenticationBuilder) = if not state.CookiesAl

type Saturn.Application.ApplicationBuilder with
/// Enables default Google OAuth authentication.
/// `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.
/// `jsonToClaimMap` should contain a sequence of tuples where the first element is the name of the key in the JSON object and the second element is the name of the claim.
/// 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).
[<CustomOperation("use_google_oauth")>]
member __.UseGoogleAuth(state: ApplicationState, clientId : string, clientSecret : string, callbackPath : string, jsonToClaimMap : (string * string) seq) =
Expand Down Expand Up @@ -71,7 +71,7 @@ type Saturn.Application.ApplicationBuilder with
}

/// Enables default GitHub OAuth authentication.
/// `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.
/// `jsonToClaimMap` should contain a sequence of tuples where the first element is the name of the key in the JSON object and the second element is the name of the claim.
/// 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).
[<CustomOperation("use_github_oauth")>]
member __.UseGithubAuth(state: ApplicationState, clientId : string, clientSecret : string, callbackPath : string, jsonToClaimMap : (string * string) seq) =
Expand Down Expand Up @@ -128,7 +128,7 @@ type Saturn.Application.ApplicationBuilder with

/// Enalbes default Azure AD OAuth authentication.
/// `scopes` must be at least on of the scopes defined in https://docs.microsoft.com/en-us/graph/permissions-reference, for instance "User.Read".
/// `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.
/// `jsonToClaimMap` should contain a sequence of tuples where the first element is the name of the key in the JSON object and the second element is the name of the claim.
/// 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).
[<CustomOperation("use_azuread_oauth")>]
member __.UseAzureADAuth(state: ApplicationState, tenantId : string, clientId : string, clientSecret: string, callbackPath : string, scopes : string seq, jsonToClaimMap : (string * string) seq) =
Expand Down
2 changes: 1 addition & 1 deletion src/Saturn/Authentication.fs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ module OAuth =
///OAuth User Information endpoint
///For example: https://api.github.com/user
UserInformationEndpoint: string
///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.
///Sequence of tuples where the first element is the name of the key in the JSON object and the second element is the name of the claim.
///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).
Claims : (string * string) seq
}
Expand Down

0 comments on commit f22bca0

Please sign in to comment.