Documentation

CheckCredential extends AutoService
in package
implements EventSubscriberInterface

This class is a small collection of common/default credential checkers.

Tags
service

authx.credentials

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

getSubscribedEvents()

public static getSubscribedEvents() : array<string|int, mixed>
Tags
inheritdoc

Set up three subscribers to handle different credential formats ('Basic', 'Bearer') and different credential types ('pass', 'api_key', 'jwt')

Return values
array<string|int, mixed>

        
On this page

Search results