Skip to content

Commit c57def2

Browse files
committed
Update auth client config and versioning
1 parent a687a47 commit c57def2

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

src/Umbraco.AuthorizedServices/Client/public/umbraco-package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"id": "Umbraco.AuthorizedServices",
33
"name": "Umbraco Authorized Services",
4-
"version": "15.0.0",
4+
"version": "16.0.0",
55
"extensions": [
66
{
77
"name": "Umbraco EntryPoint",
Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import type { UmbEntryPointOnInit } from "@umbraco-cms/backoffice/extension-api";
22
import { UMB_AUTH_CONTEXT } from "@umbraco-cms/backoffice/auth";
33
import { client } from "../generated/index.js";
4+
import { umbHttpClient } from "@umbraco-cms/backoffice/http-client";
45
import { manifests as workspaceManifests } from "./workspace/manifests.js";
56
import { manifests as treeManifests } from "./tree/manifests.js";
67

@@ -10,12 +11,6 @@ export const onInit: UmbEntryPointOnInit = (_host, extensionRegistry) => {
1011
_host.consumeContext(UMB_AUTH_CONTEXT, async (auth) => {
1112
if (!auth) return;
1213

13-
const config = auth.getOpenApiConfiguration();
14-
15-
client.setConfig({
16-
auth: config.token,
17-
baseUrl: config.base,
18-
credentials: config.credentials,
19-
});
14+
client.setConfig(umbHttpClient.getConfig());
2015
});
2116
};

src/Umbraco.AuthorizedServices/Umbraco.AuthorizedServices.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<ImplicitUsings>enable</ImplicitUsings>
66
<StaticWebAssetBasePath>/App_Plugins/UmbracoAuthorizedServices</StaticWebAssetBasePath>
77
<EnableDefaultContentItems>false</EnableDefaultContentItems>
8+
<CompressionEnabled>false</CompressionEnabled>
89
</PropertyGroup>
910

1011
<PropertyGroup>
@@ -57,6 +58,6 @@
5758
<ShouldRunClientAssetsBuild>true</ShouldRunClientAssetsBuild>
5859
</PropertyGroup>
5960
<Target Name="ClientAssetsBuildOutputPath" BeforeTargets="ClientAssetsBuild">
60-
<WriteLinesToFile File="Client\config.outputPath.js" Lines="export const outputPath = '$(Configuration)' !== 'Release' ? '../wwwroot' : '../$(IntermediateOutputPath.Replace('\', '/'))clientassets';" Overwrite="true" />
61+
<WriteLinesToFile File="Client\config.outputPath.js" Lines="export const outputPath = '../$(IntermediateOutputPath.Replace('\', '/'))clientassets';" Overwrite="true" />
6162
</Target>
6263
</Project>

0 commit comments

Comments
 (0)