mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-11-30 04:33:41 +08:00
41438adbd1
- Removed uneeded custom refresh or logout actions for OIDC. - Restructured how the services and guards are setup for external auth systems. SAML2 and OIDC now directly share a lot more logic. - Renamed any OpenId references to OIDC or OpenIdConnect - Removed non-required CSRF excemption for OIDC Not tested, Come to roadblock due to lack of PHP8 support in upstream dependancies. Certificate was deemed to be non-valid on every test attempt due to changes in PHP8.
40 lines
919 B
PHP
40 lines
919 B
PHP
<?php
|
|
|
|
namespace BookStack\Auth\Access\Guards;
|
|
|
|
/**
|
|
* Saml2 Session Guard.
|
|
*
|
|
* The saml2 login process is async in nature meaning it does not fit very well
|
|
* into the default laravel 'Guard' auth flow. Instead most of the logic is done
|
|
* via the Saml2 controller & Saml2Service. This class provides a safer, thin
|
|
* version of SessionGuard.
|
|
*/
|
|
class AsyncExternalBaseSessionGuard extends ExternalBaseSessionGuard
|
|
{
|
|
/**
|
|
* Validate a user's credentials.
|
|
*
|
|
* @param array $credentials
|
|
*
|
|
* @return bool
|
|
*/
|
|
public function validate(array $credentials = [])
|
|
{
|
|
return false;
|
|
}
|
|
|
|
/**
|
|
* Attempt to authenticate a user using the given credentials.
|
|
*
|
|
* @param array $credentials
|
|
* @param bool $remember
|
|
*
|
|
* @return bool
|
|
*/
|
|
public function attempt(array $credentials = [], $remember = false)
|
|
{
|
|
return false;
|
|
}
|
|
}
|