首页
随机
最近更改
特殊页面
社群首页
参数设置
关于WHY42
免责声明
WHY42
搜索
用户菜单
登录
欢迎来到Riguz的小站!这是一个私人wiki,用来记录一些我的笔记。
查看“︁Keycloak”︁的源代码
←
Keycloak
因为以下原因,您没有权限编辑该页面:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
== Install == <syntaxhighlight lang="bash"> docker run --name example-keycloak \ -p 8081:8080 -d \ -e KC_BOOTSTRAP_ADMIN_USERNAME=admin \ -e KC_BOOTSTRAP_ADMIN_PASSWORD=<change it> \ quay.io/keycloak/keycloak:26.0.7 start-dev \ --hostname=https://oauth.example.com </syntaxhighlight> Reversed proxy<ref>https://medium.com/@asynchronouscal/keycloak-production-mode-with-docker-step-by-step-guide-b284927e72c0</ref>: <syntaxhighlight lang="config"> server { server_name oauth.example.com; location / { root html; index index.html index.htm; proxy_pass http://localhost:8081; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Port 443; } ... } </syntaxhighlight> == Configure == * Create realm: my-org * Create users: whatever * Create client: my-app * Client ID: my-app * Valid redirect URIs: http://localhost:5173/auth/callback * Valid post logout redirect URIs : http://localhost:5173 * Web origins: http://localhost:5173 (No slash at end!!!) * Client authentication: off (for public clients) * Authentication flow: Standard flow, Direct access grants [[Category:OAuth]]
返回
Keycloak
。