Skip to content

Commit 5e69fac

Browse files
authored
Merge pull request #10 from umbraco/feature/0.1.1
Feature/0.1.1
2 parents 491f329 + 8083a92 commit 5e69fac

File tree

8 files changed

+65
-19
lines changed

8 files changed

+65
-19
lines changed

LICENSE.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# The MIT License (MIT) #
2+
3+
Copyright (c) 2023 Umbraco
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"),
6+
to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
7+
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
8+
9+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
10+
11+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
12+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
13+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
14+
IN THE SOFTWARE.

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,23 @@ Secondly, the developer has access to an interface - `IAuthorizedServiceCaller`
3131

3232
## Usage
3333

34+
### Installation
35+
36+
To easily install the package you can use the `Package Manager Console` from Visual Studio, or the `dotnet CLI` tool.
37+
38+
#### Package Manager Console
39+
```
40+
Install-Package
41+
Umbraco.AuthorizedServices
42+
```
43+
44+
#### Dotnet CLI
45+
```
46+
dotnet add package
47+
Umbraco.AuthorizedServices
48+
```
49+
50+
3451
### App Creation
3552

3653
Services that this package are intended to support will offer an OAuth authentication and authorization flow against an "app" that the developer will need to create with the service. From this various information will be available, including for example a "client ID" and "client secret" that will need to be applied in configuration.

Umbraco.AuthorizedServices.sln

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
1515
Directory.Build.props = Directory.Build.props
1616
global.json = global.json
1717
icon.png = icon.png
18+
LICENSE.md = LICENSE.md
1819
README.md = README.md
1920
umbraco-marketplace.json = umbraco-marketplace.json
2021
version.json = version.json

src/Umbraco.AuthorizedServices/AuthorizedServicesComposer.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using Microsoft.Extensions.Configuration;
22
using Microsoft.Extensions.DependencyInjection;
33
using Umbraco.AuthorizedServices.Configuration;
4+
using Umbraco.AuthorizedServices.Manifests;
45
using Umbraco.AuthorizedServices.Migrations;
56
using Umbraco.AuthorizedServices.Services;
67
using Umbraco.AuthorizedServices.Services.Implement;
@@ -18,6 +19,9 @@ public void Compose(IUmbracoBuilder builder)
1819
IConfigurationSection configSection = builder.Config.GetSection("Umbraco:AuthorizedServices");
1920
builder.Services.Configure<AuthorizedServiceSettings>(configSection);
2021

22+
// manifest filter
23+
builder.ManifestFilters().Append<AuthorizedServicesManifestFilter>();
24+
2125
builder.Services.AddUnique<IAuthorizationClientFactory, AuthorizationClientFactory>();
2226
builder.Services.AddUnique<IAuthorizationParametersBuilder, AuthorizationParametersBuilder>();
2327
builder.Services.AddUnique<IAuthorizationRequestSender, AuthorizationRequestSender>();

src/Umbraco.AuthorizedServices/ClientApp/src/package.manifest

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

src/Umbraco.AuthorizedServices/Constants.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
using System.Diagnostics;
2+
13
namespace Umbraco.AuthorizedServices;
24

35
public static class Constants
@@ -6,6 +8,8 @@ public static class Constants
68

79
public const string Separator = "-";
810

11+
public static readonly string InformationalVersion = FileVersionInfo.GetVersionInfo(typeof(Constants).Assembly.Location).ProductVersion!;
12+
913
public static class Trees
1014
{
1115
public const string AuthorizedServices = nameof(AuthorizedServices);
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
using Umbraco.Cms.Core.Manifest;
2+
3+
namespace Umbraco.AuthorizedServices.Manifests;
4+
5+
public class AuthorizedServicesManifestFilter : IManifestFilter
6+
{
7+
public void Filter(List<PackageManifest> manifests)
8+
{
9+
manifests.Add(new PackageManifest
10+
{
11+
AllowPackageTelemetry = true,
12+
Version = Constants.InformationalVersion,
13+
PackageName = "Umbraco Authorized Services",
14+
BundleOptions = BundleOptions.None,
15+
Scripts = new[]
16+
{
17+
"/App_Plugins/UmbracoAuthorizedServices/index.js"
18+
},
19+
Stylesheets = new[]
20+
{
21+
"/App_Plugins/UmbracoAuthorizedServices/css/style.css"
22+
}
23+
});
24+
}
25+
}

src/Umbraco.AuthorizedServices/Umbraco.AuthorizedServices.csproj

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,7 @@
3232
<ClientAssetsInputs Remove="ClientApp\src\css\style.css" />
3333
</ItemGroup>
3434

35-
<!-- Update package.manifest files with current build version after client assets build -->
3635
<ItemGroup>
3736
<PackageReference Include="Umbraco.JsonSchema.Extensions" Version="0.3.0" PrivateAssets="all" />
3837
</ItemGroup>
39-
<Target Name="UpdatePackageManifestVersion" DependsOnTargets="ClientAssetsBuild" AfterTargets="GetUmbracoBuildVersion">
40-
<ItemGroup>
41-
<_PackageManifestFiles Include="$(IntermediateOutputPath)clientassets\**\package.manifest" />
42-
</ItemGroup>
43-
<JsonPathUpdateValue JsonFile="%(_PackageManifestFiles.FullPath)" Path="$.version" Value="&quot;$(PackageVersion)&quot;" />
44-
</Target>
4538
</Project>

0 commit comments

Comments
 (0)