feat(auth): 支持 OIDC 并映射到本地用户 - #199
Open
hi-pengbo wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
LunaTV 只有本地用户名/密码登录,无法对接 Authelia / Authentik / Keycloak 等身份提供方。这次补上标准 OIDC,登录后仍走现有用户体系(角色、收藏、播放记录、用户组不变)。
改动
/api/oidc/login、/api/oidc/callbacksub绑定,其次按用户名;可自动建号;用户名等于USERNAME时按站长登录authcookie 签发逻辑,密码登录行为保持不变client_secret_post(兼容 Authelia 将单个 client 固定为 post 的配置)使用
需要
redis/kvrocks/upstash多用户存储,不支持localstorage。