fix(astrolabe): rename OAuthController and fix app password check
- Rename OAuthController.php to OauthController.php for consistency - Fix Personal.php to check specifically for app password presence using getBackgroundSyncPassword() instead of hasBackgroundSyncAccess() for hybrid auth mode Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.5
parent
0b6a6b0842
commit
c5bf4cda8a
+1
-1
@@ -32,7 +32,7 @@ use Psr\Log\LoggerInterface;
|
|||||||
* - Public clients: PKCE only
|
* - Public clients: PKCE only
|
||||||
* - Confidential clients: PKCE + client_secret (defense in depth)
|
* - Confidential clients: PKCE + client_secret (defense in depth)
|
||||||
*/
|
*/
|
||||||
class OAuthController extends Controller {
|
class OauthController extends Controller {
|
||||||
private IConfig $config;
|
private IConfig $config;
|
||||||
private ISession $session;
|
private ISession $session;
|
||||||
private IUserSession $userSession;
|
private IUserSession $userSession;
|
||||||
+3
-1
@@ -86,7 +86,9 @@ class Personal implements ISettings {
|
|||||||
if ($authMode === 'multi_user_basic' && $supportsAppPasswords) {
|
if ($authMode === 'multi_user_basic' && $supportsAppPasswords) {
|
||||||
// Check both credentials
|
// Check both credentials
|
||||||
$hasOAuthToken = ($token !== null && !$this->tokenStorage->isExpired($token));
|
$hasOAuthToken = ($token !== null && !$this->tokenStorage->isExpired($token));
|
||||||
$hasAppPassword = $this->tokenStorage->hasBackgroundSyncAccess($userId);
|
// In hybrid mode, check specifically for app password (not general background access)
|
||||||
|
// because MCP server needs the app password for background sync
|
||||||
|
$hasAppPassword = ($this->tokenStorage->getBackgroundSyncPassword($userId) !== null);
|
||||||
$backgroundSyncType = $this->tokenStorage->getBackgroundSyncType($userId);
|
$backgroundSyncType = $this->tokenStorage->getBackgroundSyncType($userId);
|
||||||
$backgroundSyncProvisionedAt = $this->tokenStorage->getBackgroundSyncProvisionedAt($userId);
|
$backgroundSyncProvisionedAt = $this->tokenStorage->getBackgroundSyncProvisionedAt($userId);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user