SilverStripe\GraphQL\Auth\Handler::requireAuthentication
If required, enforce authentication for non-session authenticated requests. The Member returned from the authentication method will returned for use in the OperationResolver context.
Authenticators are defined in configuration. @see AuthenticatorInterface::authenticate.
Signature
public function requireAuthentication(HTTPRequest
$request )
Parameters
$request
— SilverStripe\Control\HTTPRequest
Returns
- Member|false
- If authentication was successful the Member is returned. False if no
authenticators are configured.
Errors/Exceptions
-
ValidationException
- If authentication is attempted and fails