You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 13/umbraco-cms/reference/content-delivery-api/protected-content-in-the-delivery-api.md
+22Lines changed: 22 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -382,6 +382,28 @@ To terminate the active session for any given member, you must redirect the brow
382
382
GET /umbraco/delivery/api/v1/security/member/signout?post_logout_redirect_uri={valid URL from LogoutRedirectUrls}
383
383
```
384
384
385
+
### User info
386
+
387
+
The "user info" endpoint is part of the [OpenId Connect core spec](https://openid.net/specs/openid-connect-core-1_0.html#UserInfo).
388
+
389
+
This implementation returns a few of the [standard claims](https://openid.net/specs/openid-connect-basic-1_0.html#StandardClaims), all of which are subject of availability:
390
+
391
+
-`sub` (required claim)
392
+
-`name` (if available)
393
+
-`email` (if available)
394
+
395
+
On top of this, the member groups (if any) are returned in the role claim.
396
+
397
+
The implementation is build to be extendable, so custom claims can be added to these claims - and the core claims can be removed, too.
398
+
399
+
```http
400
+
GET /umbraco/delivery/api/v1/security/member/userinfo
401
+
```
402
+
403
+
{% hint style="info" %}
404
+
This was introduced in Umbraco 13.6.0.
405
+
{% endhint %}
406
+
385
407
## Testing with Swagger
386
408
387
409
The Delivery API Swagger document can be configured to support member authentication.
Copy file name to clipboardExpand all lines: 13/umbraco-cms/reference/webhooks/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -72,7 +72,7 @@ however, the `Content deleted` does not send the entire content as JSON, instead
72
72
By default, webhook requests will include 3 headers
73
73
-`user-agent: Umbraco-Cms/{version}`, where version is the current version of Umbraco.
74
74
-`umb-webhook-retrycount: {number of retries}`, where number of retries, is the current retry count for a given webhook request.
75
-
-`umb-webhook-event: {Umbraco.event}`, where event is the event that triggered the request, for example for Content published: `umb-webhook-event: Umbraco.ContentUnpublish`
75
+
-`umb-webhook-event: {Umbraco.event}`, where event is the event that triggered the request, for example for Content published: `umb-webhook-event: Umbraco.ContentPublish`
In this section, you will learn how to add a Content Security Policy (CSP)
4
+
nonce to scripts & styles injected by Engage.
5
+
---
6
+
7
+
# Content Security Policy nonce configuration
8
+
9
+
Engage automatically injects different scripts and styles into the returned HTML when requesting content. It also adds the option to set a nonce for the duration of a request to be picked up and added to said scripts and styles. This can be used when a CSP requires a nonce for scripts. 
10
+
11
+
{% hint style="info" %}
12
+
This feature has been added in version 13.3.0+ of Engage.
13
+
{% endhint %}
14
+
15
+
## How to set a nonce
16
+
17
+
Because a nonce should only be used once, it must be set in a location that gives control for individual requests. This could be in a Render Controller Action or a Service with lifetime Scoped or Transient. The following steps use a Render Controller to set a nonce.
18
+
19
+
1. Get an instance of `IContentInjectionSecurityService` from the `Umbraco.Engage.Infrastructure.Common.Security` namespace into your controller using dependency injection. 
20
+
2. Call the `.SetNonceForCurrentRequest("Your-Nonce-Here")` method before rendering content.
Copy file name to clipboardExpand all lines: 14/umbraco-cms/fundamentals/design/templates/README.md
+76-40Lines changed: 76 additions & 40 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,32 +1,46 @@
1
1
---
2
-
description: Templating in Umbraco including inheriting from master template
2
+
description: Templating in Umbraco builds on the concept of Razor Views from ASP.NET MVC.
3
3
---
4
4
5
5
# Templates
6
6
7
-
_Templating in Umbraco builds on the concept of Razor Views from ASP.NET MVC - if you already know this, then you are ready to create your first template - if not, this is a quick and handy guide._
7
+
Templates are the files that control the look and feel of the frontend of your Umbraco websites. Building on the concept of MVC Razor Views, template files enable you to structure your websites using HTML, CSS, and JavaScript. When tied to a Document Type, templates are used to render your Umbraco content on the frontend.
8
8
9
-
## Creating your first Template
9
+
You can manage and work with your templates directly from the Settings section in the Umbraco backoffice. Each Template can also be found as a `cshtml` file in the `Views` folder in your project directory.
10
10
11
-
By default, all document types should have a template attached - but in case you need an alternative template or a new one, you can create one:
11
+
## Creating Templates
12
+
13
+
When building an Umbraco website you can automatically generate Templates when you create a new Document Type. This will ensure the connection between the two and you can jump straight from defining the content to structuring it.
14
+
15
+
Choose the option called **[Document Type with Template](../../data/defining-content/README.md)** when you create a new Document Type to automatically create a Template as well.
16
+
17
+
In some cases, you might want to create independent Templates that don't have a direct connection to a Document Type. You can follow the steps below to create a new blank Template:
12
18
13
19
1. Go to the **Settings** section inside the Umbraco backoffice.
14
20
2. Click **...** next to the **Templates** folder.
15
21
3. Choose **Create**.
16
22
4. Enter a template name.
17
-
5. Click the **Save** button. You will now see the default template markup in the backoffice template editor.
23
+
5. Click the **Save** button.
24
+
25
+
You will now see the default template markup in the backoffice template editor.
18
26
19
27

20
28
21
29
## Allowing a Template on a Document Type
22
30
23
-
To use a template on a document, you must first allow it on the content's type. Open the Document Type you want to use the template, go to the Templates tab and select the template under the **Allowed Templates** section.
31
+
To use a Template on your content, you must first allow it on the content Document Type.
32
+
33
+
1. Open the Document Type you want to use the template.
34
+
2. Open the **Templates** Workspace View.
35
+
3. Select your Template under the **Allowed Templates** section.
24
36
25
37

26
38
27
-
## Inheriting a Master Template
39
+
## Inheriting a Template
40
+
41
+
A Template can inherit content from a "Master Template". This is done by using the ASP.NET views Layout feature.
28
42
29
-
A template can inherit content from a master template by using the ASP.NET views Layout feature. Let's say we have a template called **MasterView**, containing the following HTML:
43
+
Let's say you have a Template called **MainView**, containing the following HTML:
When a page using the textpage template renders, the final HTML will be merged replacing the `@renderBody()` placeholder, and produce the following:
84
+
When a page that uses a Template with a Master Template defined is rendered, the HTML of the two templates is merged.
85
+
86
+
The code from the Template replaces the `@RenderBody()` tag in the Master Template. Following the examples above, the final HTML will look like the code in the snippet below:
60
87
61
88
```csharp
62
89
@inheritsUmbraco.Web.Mvc.UmbracoViewPage
@@ -72,17 +99,39 @@ When a page using the textpage template renders, the final HTML will be merged r
What's good to know, is that you are not limited to a single section. Template sections allow child templates that inherit the master layout template to insert HTML code up into the main layout template. For example, a child template inserting code into the `<head>` tag of the master template.
0 commit comments