Skip to content

Commit 04c9663

Browse files
committed
Updated docs
1 parent ef14c2c commit 04c9663

File tree

1 file changed

+70
-1
lines changed

1 file changed

+70
-1
lines changed

README.md

Lines changed: 70 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,23 +65,43 @@ Details of services available need to be applied to the Umbraco web application'
6565
{
6666
"<serviceAlias>": {
6767
"DisplayName": "",
68+
"AuthenticationMethod": "",
69+
"ClientCredentialsProvision": "",
6870
"ApiHost": "",
6971
"IdentityHost": "",
7072
"TokenHost": "",
7173
"RequestIdentityPath": "",
74+
"CanManuallyProvideToken": true|false,
75+
"CanManuallyProvideApiKey": true|false,
76+
"CanExchangeToken": true|false,
77+
"ExchangeTokenProvision": {
78+
"TokenHost": "",
79+
"RequestTokenPath": "",
80+
"TokenGrantType": "",
81+
"RequestRefreshTokenPath": "",
82+
"RefreshTokenGrantType": "",
83+
"ExchangeTokenWhenExpiresWithin": ""
84+
},
7285
"AuthorizationUrlRequiresRedirectUrl": true|false,
7386
"RequestTokenPath": "",
87+
"RequestAuthorizationPath": "",
7488
"JsonSerializer": "",
7589
"RequestTokenFormat": "",
7690
"AuthorizationRequestRequiresAuthorizationHeaderWithBasicToken": true|false,
91+
"ApiKey": "",
92+
"ApiKeyProvision": {
93+
"Method": "",
94+
"Key": ""
95+
},
7796
"ClientId": "",
7897
"ClientSecret": "",
7998
"UseProofKeyForCodeExchange": true|false,
8099
"Scopes": "",
81100
"AccessTokenResponseKey": "access_token",
82101
"RefreshTokenResponseKey": "refresh_token",
83102
"ExpiresInResponseKey": "expires_in",
84-
"SampleRequest": ""
103+
"SampleRequest": "",
104+
"RefreshAccessTokenWhenExpiresWithin": ""
85105
}
86106
}
87107
}
@@ -111,6 +131,16 @@ The value contains the following elements:
111131

112132
Provides a friendly name for the service used for identification in the user interface.
113133

134+
###### AuthenticationMethod
135+
136+
Specifies the type of authentication the service will use, from one of the following available options: `OAuth1`, `OAuth2AuthorizationCode`, `OAuth2ClientCredentials` or `ApiKey`.
137+
138+
If none provided, it will default to `OAuth2AuthorizationCode`.
139+
140+
###### ClientCredentialsProvision
141+
142+
Specifies the available options for providing credentials in an `OAuth2` flow: `AuthHeader` or `RequestBody`.
143+
114144
###### ApiHost *
115145

116146
The host name for the service API that will be called to deliver business functionality. E.g. for Github this is `https://api.github.com`.
@@ -127,6 +157,29 @@ Some providers make available a separately hosted service for handling requests
127157

128158
Used, along with `IdentityHost` to construct a URL that the user is redirected to when initiating the authorization of the service via the backoffice. For GitHub, the required value is `/login/oauth/authorize`.
129159

160+
###### CanManuallyProvideToken
161+
162+
Specifies whether an administrator can manually add tokens.
163+
164+
###### CanManuallyProvideApiKey
165+
166+
Specifies whether an administrator can manually add API keys.
167+
168+
###### CanExchangeToken
169+
170+
Specifies whether the access token can be exchanged with a long lived one.
171+
172+
###### ExchangeTokenProvision
173+
174+
Provides a strongly typed configuration for a setup that allows exchanging an access token.
175+
In this case the configuration includes:
176+
- `TokenHost`
177+
- `RequestTokenPath`
178+
- `TokenGrantType`
179+
- `RequestRefreshTokenPath`
180+
- `RefreshTokenGrantType`
181+
- `ExchangeTokenWhenExpiresWithin`
182+
130183
###### AuthorizationUrlRequiresRedirectUrl
131184

132185
Some providers require a redirect URL to be provided with the authentication request. For others, instead it's necessary to configure this as part of the registered app. The default value if not provided via configuration is `false`, which is sufficient for the GitHub example.
@@ -139,6 +192,10 @@ Used, along with `TokenHost` to construct a URL used for retrieving access token
139192

140193
An enum value that controls how the request to retrieve an access token is formatted. Options are `Querystring` and `FormUrlEncoded`. `Querystring` is the default value and is used for GitHub.
141194

195+
###### RequestAuthorizationPath
196+
197+
Required in `OAuth1a` flows for building the service authorization URL.
198+
142199
###### JsonSerializer
143200

144201
An enum value that defines the JSON serializer to use when creating requests and deserializing responses. Options are `Default` and `JsonNet` and `SystemTextJson`.
@@ -152,6 +209,14 @@ An enum value that defines the JSON serializer to use when creating requests and
152209
This flag indicates whether the basic token should be included in the request for access token. If true, a base64 encoding of <clientId>:<clientSecret> will be added to
153210
the authorization header.
154211

212+
###### API Key
213+
214+
Specifies the key a service with `AuthenticationMethod=ApiKey` will use for making authorized requests to the API.
215+
216+
###### ApiKeyProvision
217+
218+
For `ApiKey` authentication methods, options for passing the API key need to be set, by specifying a method: `HttpHeader` or `QueryString` and the name for the key holding the value.
219+
155220
###### ClientId *
156221

157222
This value will be retrieved from the registered service app.
@@ -189,6 +254,10 @@ The expected key for retrieving the datetime of token expiry from a response. If
189254

190255
An optional sample request can be provided, which can be used to check that an authorized service is functioning as expected from the backoffice. For example, to retrieve the set of contributors to the Umbraco repository hosted at GitHub, this request can be used: `/repos/Umbraco/Umbraco-CMS/contributors`.
191256

257+
###### RefreshAccessTokenWhenExpiresWithin
258+
259+
Specifies a time interval for expiration of access tokens.
260+
192261
### Authorizing a Service
193262

194263
With one or more service configured, it will be available from the items within a tree in the _Settings_ section:

0 commit comments

Comments
 (0)