Skip to content

Commit 582afda

Browse files
Updates based on Engineering feedback
1 parent 85d7aa3 commit 582afda

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

articles/static-apps/user-information.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,20 @@ ms.author: cshoe
1313

1414
Azure Static Web Apps provides authentication-related user information via a [direct-access endpoint](#direct-access-endpoint) and to [API functions](#api-functions).
1515

16-
Many user interfaces rely heavily on user authentication data. The direct-access endpoint is a helper that exposes user information without having to implement a custom function. Beyond convenience, the direct-access endpoint isn't subject to cold start delays associated with serverless architecture.
16+
Many user interfaces rely heavily on user authentication data. The direct-access endpoint is a utility API that exposes user information without having to implement a custom function. Beyond convenience, the direct-access endpoint isn't subject to cold start delays that are associated with serverless architecture.
1717

1818
## Client principal data
1919

20-
User information is available in the app via the `x-ms-client-principal` request header. The client principal data is sent as a [Base64](https://www.wikipedia.org/wiki/Base64)-encoded string containing a serialized JSON object.
21-
22-
The following properties are featured in the client principal object:
20+
Client principal data object exposes user-identifiable information to your app. The following properties are featured in the client principal object:
2321

2422
| Property | Description |
2523
|-----------|---------|
2624
| `identityProvider` | The name of the [identity provider](authentication-authorization.md). |
27-
| `userId` | An Azure Static Web Apps-specific unique identifier for the user. <ul><li>The value is unique on a per-app basis. For instance, the same user returns a different `userId` value on a different Static Web Apps site.<li>The value persists for the lifetime of a user. If you delete and add the same user back to the app, a new `userId` is generated.</ul>|
25+
| `userId` | An Azure Static Web Apps-specific unique identifier for the user. <ul><li>The value is unique on a per-app basis. For instance, the same user returns a different `userId` value on a different Static Web Apps resource.<li>The value persists for the lifetime of a user. If you delete and add the same user back to the app, a new `userId` is generated.</ul>|
2826
| `userDetails` | Username or email address of the user. Some providers return the [user's email address](authentication-authorization.md), while others send the [user handle](authentication-authorization.md). |
2927
| `userRoles` | An array of the [user's assigned roles](authentication-authorization.md). |
3028

31-
The following example is a sample decoded `x-ms-client-principal` object:
29+
The following example is a sample client principal object:
3230

3331
```json
3432
{
@@ -60,7 +58,9 @@ console.log(getUserInfo());
6058

6159
## API functions
6260

63-
Client principal data is passed to API functions in the request header. The following example function, named `user`, shows how to read and return user information.
61+
Client principal data is passed to API functions in the `x-ms-client-principal` request header. The client principal data is sent as a [Base64](https://www.wikipedia.org/wiki/Base64)-encoded string containing a serialized JSON object.
62+
63+
The following example function, named `user`, shows how to read and return user information.
6464

6565
```javascript
6666
module.exports = async function (context, req) {

0 commit comments

Comments
 (0)