2020-02-02 00:11:56 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace BookStack\Auth\Access\Guards;
|
|
|
|
|
2020-02-02 18:59:03 +08:00
|
|
|
/**
|
2021-06-26 23:23:15 +08:00
|
|
|
* Saml2 Session Guard.
|
2020-02-02 18:59:03 +08:00
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*/
|
2021-10-07 06:05:26 +08:00
|
|
|
class AsyncExternalBaseSessionGuard extends ExternalBaseSessionGuard
|
2020-02-02 00:11:56 +08:00
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Validate a user's credentials.
|
|
|
|
*
|
|
|
|
* @param array $credentials
|
2021-06-26 23:23:15 +08:00
|
|
|
*
|
2020-02-02 00:11:56 +08:00
|
|
|
* @return bool
|
|
|
|
*/
|
|
|
|
public function validate(array $credentials = [])
|
|
|
|
{
|
2020-02-02 18:59:03 +08:00
|
|
|
return false;
|
2020-02-02 00:11:56 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Attempt to authenticate a user using the given credentials.
|
|
|
|
*
|
|
|
|
* @param array $credentials
|
2021-06-26 23:23:15 +08:00
|
|
|
* @param bool $remember
|
|
|
|
*
|
2020-02-02 00:11:56 +08:00
|
|
|
* @return bool
|
|
|
|
*/
|
|
|
|
public function attempt(array $credentials = [], $remember = false)
|
|
|
|
{
|
2020-02-02 18:59:03 +08:00
|
|
|
return false;
|
2020-02-02 00:11:56 +08:00
|
|
|
}
|
|
|
|
}
|