SilverStripe\GraphQL\Auth\Handler
The authentication Handler is responsible for handling authentication requirements and providing a Member to the Manager if required, so it can be used in request contexts.
Synopsis
class Handler
{
- // members
- private static array $authenticators = ;
- // methods
- public Member|false requireAuthentication()
- public null|AuthenticatorInterface getAuthenticator()
- protected AuthenticatorInterface buildAuthenticator()
- public void prioritiseAuthenticators()
Hierarchy
Uses
- SilverStripe\Core\Config\Configurable
Tasks
Line | Task |
---|---|
+ | Move this to a per-schema configuration and refer to this schema from the current endpoint |
Members
private
- $authenticators — array
Methods
protected
public
- getAuthenticator() — Returns the first configured authenticator by highest priority, or null if none are configured
- prioritiseAuthenticators() — Sort the configured authenticators by their "priority" (highest to lowest). This allows modules to contribute to the decision of which authenticator should be used first. Users can rewrite this in their own configuration if necessary.
- 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.