Skip to content

Commit b9daea7

Browse files
authored
Merge pull request #51 from umbraco/develop
Develop
2 parents 9119ee0 + e0c0b4a commit b9daea7

File tree

110 files changed

+17475
-21240
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+17475
-21240
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,6 +480,6 @@ $RECYCLE.BIN/
480480
## Umbraco AuthorizedServices specific
481481
##
482482
/src/Umbraco.AuthorizedServices/ClientApp/gulp/config.outputPath.js
483-
483+
/examples/Umbraco.AuthorizedServices.TestSite.V14/umbraco/Data/TEMP/
484484
# Git
485485
.orig

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project>
22
<PropertyGroup>
3-
<TargetFramework>net6.0</TargetFramework>
3+
<TargetFramework>net8.0</TargetFramework>
44
<LangVersion>latest</LangVersion>
55
<Nullable>enable</Nullable>
66
<WarningsAsErrors>Nullable</WarningsAsErrors>

README.md

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ Details of services available need to be applied to the Umbraco web application'
9292
"RequestTokenPath": "",
9393
"RequestTokenMethod": "GET|POST",
9494
"RequestAuthorizationPath": "",
95-
"JsonSerializer": "Default|JsonNet|SystemTextJson",
9695
"RequestTokenFormat": "Querystring|FormUrlEncoded",
9796
"AuthorizationRequestRequiresAuthorizationHeaderWithBasicToken": true|false,
9897
"ApiKey": "",
@@ -212,14 +211,6 @@ An enum value that controls how the request to retrieve an access token is forma
212211

213212
Required in `OAuth1` flows for building the service authorization URL.
214213

215-
###### JsonSerializer
216-
217-
An enum value that defines the JSON serializer to use when creating requests and deserializing responses. Options are `Default` and `JsonNet` and `SystemTextJson`.
218-
219-
- `Default` - uses the Umbraco CMS default `IJsonSerializer`.
220-
- `JsonNet` - uses the JSON.Net serializer.
221-
- `SystemTextJson` - uses the System.Text.Json serializer.
222-
223214
###### AuthorizationRequestRequiresAuthorizationHeaderWithBasicToken
224215

225216
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
@@ -289,7 +280,7 @@ Clicking on an item will show some details about the configured service, and it'
289280

290281
If the service is not yet authorized, click the _Authorize Service_ button to trigger the authentication and authorization flow. You will be directed to the service to login, and optionally choose an account. You will then be asked to agree to the permissions requested by the app. Finally you will be redirect back to the Umbraco backoffice and should see confirmation that an access token has been retrieved and stored such that the service is now authorized. If provided, you can click the _Verify Sample Request_ button to ensure that service's API can be called.
291282

292-
### Calling an Service
283+
### Calling a Service
293284

294285
To make a call to an authorized service, you first need to obtain an instance of `IAuthorizedServiceCaller`. This is registered with the dependency injection framework and as such can be injected into a controller, view or service class where it needs to be used.
295286

@@ -344,6 +335,23 @@ The list of providers for which the package has been verified is maintained at t
344335

345336
## Package Development
346337

338+
To run the solution in a local development environment:
339+
340+
```
341+
cd \examples\Umbraco.AuthorizedServices.TestSite\
342+
dotnet run
343+
344+
cd \src\Umbraco.AuthorizedServices\Client>
345+
npm i
346+
npm run build
347+
```
348+
349+
To generate types from the management API:
350+
351+
```
352+
npm run generate:api
353+
```
354+
347355
### Branching Strategy
348356

349357
The branching strategy in this repository follows a "gitflow" model:

Umbraco.AuthorizedServices.Build.sln

Lines changed: 0 additions & 46 deletions
This file was deleted.

Umbraco.AuthorizedServices.sln

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
2323
EndProject
2424
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Examples", "Examples", "{49BBAC1E-F1C7-48E2-BCF7-240B9144983F}"
2525
EndProject
26-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Umbraco.AuthorizedServices.TestSite", "examples\Umbraco.AuthorizedServices.TestSite\Umbraco.AuthorizedServices.TestSite.csproj", "{D63A0D65-08F3-497C-9311-0FBFC3AF2F4B}"
27-
EndProject
2826
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Umbraco.AuthorizedServices.Tests", "tests\Umbraco.AuthorizedServices.Tests\Umbraco.AuthorizedServices.Tests.csproj", "{3AB01311-A4B3-4F64-B9D5-8C96B0F6321A}"
2927
EndProject
28+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Umbraco.AuthorizedServices.TestSite", "examples\Umbraco.AuthorizedServices.TestSite\Umbraco.AuthorizedServices.TestSite.csproj", "{2039395D-F4DD-4BB3-B8D9-52EBE0572A18}"
29+
EndProject
3030
Global
3131
GlobalSection(SolutionConfigurationPlatforms) = preSolution
3232
Debug|Any CPU = Debug|Any CPU
@@ -37,20 +37,20 @@ Global
3737
{7F8774A8-B9D5-4F8B-B16C-26E829E948AD}.Debug|Any CPU.Build.0 = Debug|Any CPU
3838
{7F8774A8-B9D5-4F8B-B16C-26E829E948AD}.Release|Any CPU.ActiveCfg = Release|Any CPU
3939
{7F8774A8-B9D5-4F8B-B16C-26E829E948AD}.Release|Any CPU.Build.0 = Release|Any CPU
40-
{D63A0D65-08F3-497C-9311-0FBFC3AF2F4B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
41-
{D63A0D65-08F3-497C-9311-0FBFC3AF2F4B}.Debug|Any CPU.Build.0 = Debug|Any CPU
42-
{D63A0D65-08F3-497C-9311-0FBFC3AF2F4B}.Release|Any CPU.ActiveCfg = Release|Any CPU
43-
{D63A0D65-08F3-497C-9311-0FBFC3AF2F4B}.Release|Any CPU.Build.0 = Release|Any CPU
4440
{3AB01311-A4B3-4F64-B9D5-8C96B0F6321A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
4541
{3AB01311-A4B3-4F64-B9D5-8C96B0F6321A}.Debug|Any CPU.Build.0 = Debug|Any CPU
4642
{3AB01311-A4B3-4F64-B9D5-8C96B0F6321A}.Release|Any CPU.ActiveCfg = Release|Any CPU
4743
{3AB01311-A4B3-4F64-B9D5-8C96B0F6321A}.Release|Any CPU.Build.0 = Release|Any CPU
44+
{2039395D-F4DD-4BB3-B8D9-52EBE0572A18}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
45+
{2039395D-F4DD-4BB3-B8D9-52EBE0572A18}.Debug|Any CPU.Build.0 = Debug|Any CPU
46+
{2039395D-F4DD-4BB3-B8D9-52EBE0572A18}.Release|Any CPU.ActiveCfg = Release|Any CPU
47+
{2039395D-F4DD-4BB3-B8D9-52EBE0572A18}.Release|Any CPU.Build.0 = Release|Any CPU
4848
EndGlobalSection
4949
GlobalSection(SolutionProperties) = preSolution
5050
HideSolutionNode = FALSE
5151
EndGlobalSection
5252
GlobalSection(NestedProjects) = preSolution
53-
{D63A0D65-08F3-497C-9311-0FBFC3AF2F4B} = {49BBAC1E-F1C7-48E2-BCF7-240B9144983F}
53+
{2039395D-F4DD-4BB3-B8D9-52EBE0572A18} = {49BBAC1E-F1C7-48E2-BCF7-240B9144983F}
5454
EndGlobalSection
5555
GlobalSection(ExtensibilityGlobals) = postSolution
5656
SolutionGuid = {B8057185-AA26-4285-9232-D6DDB1E11E42}

azure-pipeline - Umbraco.AuthorizedServices.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ parameters:
1111
default: false
1212

1313
variables:
14-
nodeVersion: 18.x
15-
solution: Umbraco.AuthorizedServices.Build.sln
14+
nodeVersion: 20
15+
solution: Umbraco.AuthorizedServices.sln
1616
buildConfiguration: Release
1717
DOTNET_NOLOGO: true
1818
DOTNET_GENERATE_ASPNET_CERTIFICATE: false
@@ -77,7 +77,7 @@ stages:
7777
displayName: Run dotnet build
7878

7979
# Pack
80-
- script: dotnet pack $(solution) --configuration $(buildConfiguration) --no-build --output $(Build.ArtifactStagingDirectory)/nupkg
80+
- script: dotnet pack $(solution) --configuration $(buildConfiguration) --no-restore --output $(Build.ArtifactStagingDirectory)/nupkg
8181
displayName: Run dotnet pack
8282

8383
# Publish

0 commit comments

Comments
 (0)