Files
Olares/docs/zh/developer/develop/advanced/cookie.md
2025-07-17 11:58:59 +08:00

24 lines
855 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Cookie
Olares 系统中采用 SSO 的模式来为整个系统包括所有安装的应用实现授权认证。SSO 认证模式采用无侵入设计,使用 cookie 作为认证的凭证。
系统会在认证登录后设置两个 cookie
- **authelia_session**
cookie 内容为 SSO 的 session id。作用域为用户的 Olares domain `<username>.olares.com`
- **auth_token**
用户认证的 authorization token。作用域为用户的 Olares domain `<username>.olares.com`
为避免 cookie 冲突,任何应用(包括系统的内建应用,三方应用)都不可以设置 cookie 到用户的域,只可设置到应用自己的域下面。
要使用这个功能只需要在应用 chart 的 [OlaresManifest.yaml](../package/manifest.md#resetcookie) 中申明:
```yaml
options:
resetCookie:
enabled: true
```