Skip to content

Commit

Permalink
Cleaned comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Derek Crannaford committed Aug 13, 2023
1 parent 5db6e67 commit 0b015fb
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions system/modules/auth/models/AuthService.php
Original file line number Diff line number Diff line change
Expand Up @@ -333,9 +333,8 @@ public function allowed($path, $url = null)
return self::$_cache[$key];
}

// API token handling - WIP 202203

// if I have an authentication header: and it has a token -> else fallthrough to original logic
// API token handling:
// If I have an authentication header: and it has a token -> else fallthrough to original logic
// ie: expecting [...curl...etc...] -H "Authorization: Bearer {token}"
/*
Note! If under Apache & HTTP_AUTHORIZATION is dropped, prove site HTPPS and then patch access:
Expand Down Expand Up @@ -386,9 +385,12 @@ public function allowed($path, $url = null)
$this->forceLogin($user->id);
if ($user->allowed($path)) {
self::$_cache[$key] = $url ? $url : true;
// hmmm, so we have forced login,
// but do we expect to still bounce 1x through auth/login as redirect?
// = noting this 'return' is omitted in standing core releases, though is required by new tokens model!
// Observed during work for token handler:
// Here, we have forced login,
// But do we mean for it to still bounce 1x through auth/login as redirect?
// In standing core releases, a _cache[key] 'return' is omitted here
// = noting it was required by new tokens model!
// Possibly this block should also have return thus:
// return self::$_cache[$key];
}
} else {
Expand Down

0 comments on commit 0b015fb

Please sign in to comment.