mirror of
https://github.com/fosrl/docs-v2.git
synced 2026-08-31 03:01:30 +02:00
65 lines
2.9 KiB
Plaintext
65 lines
2.9 KiB
Plaintext
---
|
|
title: "Forwarded Headers"
|
|
description: "Learn how Pangolin forwards user identity information to your backend applications through HTTP headers"
|
|
---
|
|
Pangolin can forward user identity information to your backend applications through custom HTTP headers. This allows your applications to receive user details directly from the request headers, enabling integration with Pangolin's authentication system. [AI Gateway](/manage/ai/overview) resources send the same headers to the upstream provider when the caller is a known user. See [Identity Headers](/manage/ai/providers/configuration#identity-headers).
|
|
|
|
<Info>
|
|
Forwarded headers are only available when using authentication methods that provide user identity information.
|
|
</Info>
|
|
|
|
## Supported Headers
|
|
|
|
Pangolin forwards the following headers to your backend when user identity is available:
|
|
|
|
| Header | Description | Example |
|
|
|--------|-------------|---------|
|
|
| `Remote-User` | Unique username or user ID | `user_123` |
|
|
| `Remote-Email` | User's email address | `john.doe@example.com` |
|
|
| `Remote-Name` | User's full name | `John Doe` |
|
|
| `Remote-Role` | User's role or group membership | `admin` |
|
|
|
|
## Authentication Methods
|
|
|
|
### Headers Available
|
|
|
|
These authentication methods provide user identity information and will include the forwarded headers:
|
|
|
|
<CardGroup cols={2}>
|
|
<Card title="Single Sign-On (SSO)" icon="users">
|
|
Full user identity information including username, email, and name.
|
|
</Card>
|
|
|
|
<Card title="Email-based One Time Passcode (OTP)" icon="envelope">
|
|
Only `Remote-Email` is provided, set to the whitelisted address the visitor authenticated with. `Remote-User`, `Remote-Name`, and `Remote-Role` are not available since there is no associated user account.
|
|
</Card>
|
|
|
|
<Card title="Shareable Links" icon="link">
|
|
Only available if the link was created with an associated user account. In that case, full user identity information is forwarded, the same as SSO. Links created without an associated user do not provide identity headers.
|
|
</Card>
|
|
</CardGroup>
|
|
|
|
### Headers Not Available
|
|
|
|
These authentication methods do not provide user identity information:
|
|
|
|
<CardGroup cols={2}>
|
|
<Card title="PIN Code" icon="hashtag">
|
|
No user identity - only access control.
|
|
</Card>
|
|
|
|
<Card title="Password" icon="lock">
|
|
No user identity - only access control.
|
|
</Card>
|
|
</CardGroup>
|
|
|
|
## AI Gateway
|
|
|
|
[AI Gateway](/manage/ai/overview) resources forward the same `Remote-User`, `Remote-Email`, `Remote-Name`, and `Remote-Role` headers to the upstream model API when Pangolin knows the user:
|
|
|
|
- A public resource called with an [identity key](/manage/ai/virtual-api-keys#identity-keys)
|
|
- A public resource called with a [manual key](/manage/ai/virtual-api-keys#manual-keys) attributed to a user
|
|
- A private AI Gateway resource called from a connected [Pangolin client](/manage/clients/install-client)
|
|
|
|
An unattributed manual key authenticates without sending these headers. Details are in [Identity Headers](/manage/ai/providers/configuration#identity-headers).
|