-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Allow SSO authentication to provide a user secret #24837
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -170,7 +170,9 @@ public static function loginWithApache(\OCP\Authentication\IApacheBackend $backe | |||||
| $userSession = \OC::$server->getUserSession(); | ||||||
| $userSession->setLoginName($uid); | ||||||
| $request = OC::$server->getRequest(); | ||||||
| $userSession->createSessionToken($request, $uid, $uid); | ||||||
| $secret = $backend->getCurrentUserSecret(); | ||||||
| $userSession->createSessionToken($request, $uid, $uid, $secret); | ||||||
| $pw = $secret === null ? '' : $secret; | ||||||
| // setup the filesystem | ||||||
| OC_Util::setupFS($uid); | ||||||
| // first call the post_login hooks, the login-process needs to be | ||||||
|
|
@@ -182,7 +184,7 @@ public static function loginWithApache(\OCP\Authentication\IApacheBackend $backe | |||||
| 'post_login', | ||||||
| [ | ||||||
| 'uid' => $uid, | ||||||
| 'password' => '', | ||||||
| 'password' => $pw, | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| 'isTokenLogin' => false, | ||||||
| ] | ||||||
| ); | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -62,4 +62,12 @@ public function getLogoutUrl(); | |||||
| * @since 6.0.0 | ||||||
| */ | ||||||
| public function getCurrentUserId(); | ||||||
|
|
||||||
| /** | ||||||
| * Optionally returns a stable per-user secret. This secret is for | ||||||
| * instance used to secure file encryption keys. | ||||||
| * @return string|null | ||||||
| * @since 21.0.0 | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually we could move this to a separate interface like
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To avoid confusion, the PR has been redone here as immerda seems to be not maintaining it here. The version string has been adjusted already, I'll do the same with pw => password. About the new interface, you need to tell me more in detail how to do that, over there, I guess this means a new script?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah indeed, I already wondered, because I though I already reviewed something similar but was not seeing my comments on this one 👍 |
||||||
| */ | ||||||
| public function getCurrentUserSecret(); | ||||||
| } | ||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.