1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-28 17:02:04 +03:00

Applied StyleCi changes, updated php deps

This commit is contained in:
Dan Brown
2022-08-29 17:46:41 +01:00
parent e537d0c4e8
commit 1cc7c649dc
26 changed files with 435 additions and 526 deletions

View File

@ -31,7 +31,7 @@ class OidcOAuthProvider extends AbstractProvider
protected $tokenEndpoint;
/**
* Scopes to use for the OIDC authorization call
* Scopes to use for the OIDC authorization call.
*/
protected array $scopes = ['openid', 'profile', 'email'];

View File

@ -2,9 +2,8 @@
namespace BookStack\Auth\Access\Oidc;
use BookStack\Auth\Access\GroupSyncService;
use Illuminate\Support\Arr;
use function auth;
use BookStack\Auth\Access\GroupSyncService;
use BookStack\Auth\Access\LoginService;
use BookStack\Auth\Access\RegistrationService;
use BookStack\Auth\User;
@ -12,6 +11,7 @@ use BookStack\Exceptions\JsonDebugException;
use BookStack\Exceptions\StoppedAuthenticationException;
use BookStack\Exceptions\UserRegistrationException;
use function config;
use Illuminate\Support\Arr;
use Illuminate\Support\Facades\Cache;
use League\OAuth2\Client\OptionProvider\HttpBasicAuthOptionProvider;
use League\OAuth2\Client\Provider\Exception\IdentityProviderException;
@ -35,11 +35,10 @@ class OidcService
*/
public function __construct(
RegistrationService $registrationService,
LoginService $loginService,
HttpClient $httpClient,
GroupSyncService $groupService
)
{
LoginService $loginService,
HttpClient $httpClient,
GroupSyncService $groupService
) {
$this->registrationService = $registrationService;
$this->loginService = $loginService;
$this->httpClient = $httpClient;
@ -148,7 +147,7 @@ class OidcService
$scopeConfig = $this->config()['additional_scopes'] ?: '';
$scopeArr = explode(',', $scopeConfig);
$scopeArr = array_map(fn(string $scope) => trim($scope), $scopeArr);
$scopeArr = array_map(fn (string $scope) => trim($scope), $scopeArr);
return array_filter($scopeArr);
}
@ -192,7 +191,7 @@ class OidcService
return [];
}
return array_values(array_filter($groupsList, function($val) {
return array_values(array_filter($groupsList, function ($val) {
return is_string($val);
}));
}