Skip to content

Commit 3f07b15

Browse files
Use named options for services configuration (#17)
* Use named options for services configuration * Fix ambiguous AesSecretEncryptor constructor * Remove ignored CMS appsettings schema * Update JSON schema and copy to test site on build * Updated readme docs to align with new configuration structure. * Ensured token that can't be decrypted is removed to allow for re-authorization from the backoffice. --------- Co-authored-by: Andy Butland <[email protected]>
1 parent f6416c9 commit 3f07b15

27 files changed

+279
-2606
lines changed

README.md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -63,26 +63,26 @@ Details of services available need to be applied to the Umbraco web application'
6363
"TokenEncryptionKey": "",
6464
"Services": [
6565
{
66-
"Alias": "",
67-
"DisplayName": "",
68-
"ApiHost": "",
69-
"IdentityHost": "",
70-
"TokenHost": "",
71-
"RequestIdentityPath": "",
72-
"AuthorizationUrlRequiresRedirectUrl": true|false,
73-
"RequestTokenPath": "",
74-
"JsonSerializer": "",
75-
"RequestTokenFormat": "",
76-
"AuthorizationRequestRequiresAuthorizationHeaderWithBasicToken": true|false,
77-
"ClientId": "",
78-
"ClientSecret": "",
79-
"UseProofKeyForCodeExchange": true|false,
80-
"Scopes": "",
81-
"AccessTokenResponseKey": "access_token",
82-
"RefreshTokenResponseKey": "refresh_token",
83-
"ExpiresInResponseKey": "expires_in",
84-
"SampleRequest": ""
85-
},
66+
"<serviceAlias>": {
67+
"DisplayName": "",
68+
"ApiHost": "",
69+
"IdentityHost": "",
70+
"TokenHost": "",
71+
"RequestIdentityPath": "",
72+
"AuthorizationUrlRequiresRedirectUrl": true|false,
73+
"RequestTokenPath": "",
74+
"JsonSerializer": "",
75+
"RequestTokenFormat": "",
76+
"AuthorizationRequestRequiresAuthorizationHeaderWithBasicToken": true|false,
77+
"ClientId": "",
78+
"ClientSecret": "",
79+
"UseProofKeyForCodeExchange": true|false,
80+
"Scopes": "",
81+
"AccessTokenResponseKey": "access_token",
82+
"RefreshTokenResponseKey": "refresh_token",
83+
"ExpiresInResponseKey": "expires_in",
84+
"SampleRequest": ""
85+
}
8686
]
8787
}
8888
```
@@ -101,11 +101,11 @@ If not provided, the value stored in configuration at `Umbraco:CMS:Global:Id` wi
101101

102102
##### Services
103103

104-
The collection of services available for authorization and usage.
104+
The collection of services available for authorization and usage structured as a dictionary.
105105

106-
###### Alias *
106+
The dictionary key is the alias of the service, which must be unique across the service collection.
107107

108-
The alias of the service, which must be unique across the service collection.
108+
The value contains the following elements:
109109

110110
###### DisplayName *
111111

0 commit comments

Comments
 (0)