CheckCredential
extends AutoService
in package
implements
EventSubscriberInterface
This class is a small collection of common/default credential checkers.
Tags
Table of Contents
Interfaces
- EventSubscriberInterface
Constants
- PRIORITY_BASIC_USER = -200
- Listener priority for handling credential format of 'Basic' with 'username:password'.
- PRIORITY_BEARER_API_KEY = -300
- Listener priority for handling credential format of 'Bearer' with a traditional Civi API key
- PRIORITY_BEARER_JWT = -400
- Listener priority for handling credential format of 'Bearer' with Authx-style JSON Web Token.
Methods
- basicUser() : void
- Interpret the HTTP "Basic" credential as `username:password` (CMS user).
- bearerApiKey() : void
- Interpret the HTTP `Bearer` credential as a traditional Civi API key (`civicrm_contact.api_key`).
- bearerJwt() : void
- Interpret the HTTP `Bearer` credential as an Authx-style JSON Web Token.
- getSubscribedEvents() : array<string|int, mixed>
Constants
PRIORITY_BASIC_USER
Listener priority for handling credential format of 'Basic' with 'username:password'.
public
mixed
PRIORITY_BASIC_USER
= -200
PRIORITY_BEARER_API_KEY
Listener priority for handling credential format of 'Bearer' with a traditional Civi API key
public
mixed
PRIORITY_BEARER_API_KEY
= -300
PRIORITY_BEARER_JWT
Listener priority for handling credential format of 'Bearer' with Authx-style JSON Web Token.
public
mixed
PRIORITY_BEARER_JWT
= -400
Methods
basicUser()
Interpret the HTTP "Basic" credential as `username:password` (CMS user).
public
basicUser(CheckCredentialEvent $check) : void
Parameters
- $check : CheckCredentialEvent
bearerApiKey()
Interpret the HTTP `Bearer` credential as a traditional Civi API key (`civicrm_contact.api_key`).
public
bearerApiKey(CheckCredentialEvent $check) : void
Parameters
- $check : CheckCredentialEvent
bearerJwt()
Interpret the HTTP `Bearer` credential as an Authx-style JSON Web Token.
public
bearerJwt(CheckCredentialEvent $check) : void
Parameters
- $check : CheckCredentialEvent
getSubscribedEvents()
public
static getSubscribedEvents() : array<string|int, mixed>