CiviConnect
extends AutoService
in package
Manage a connection to the `connect.civicrm.org` bridge-server.
Table of Contents
Properties
- $cache : CRM_Utils_Cache_Interface|null
Methods
- createAuthToken() : string
- factory() : CiviConnect
- generateCreds() : static
- Generate a new key-pair to identify the current deployment.
- getCreds() : array<string|int, mixed>
- Find or create the connection parameters for CiviConnect bridge service.
- getHosts() : array<string|int, mixed>
- Get a list of available bridge servers.
- getId() : string|null
- isRegistered() : void
- register() : void
- createRegistration() : array<string|int, mixed>
- Generate metadata/registration record for our key-pair.
- createId() : string
Properties
$cache
protected
CRM_Utils_Cache_Interface|null
$cache
Methods
createAuthToken()
public
createAuthToken([array<string|int, mixed> $claims = [] ]) : string
Parameters
- $claims : array<string|int, mixed> = []
Return values
stringfactory()
public
static factory(CryptoRegistry $registry[, CRM_Utils_Cache_Interface $cache = null ]) : CiviConnect
Parameters
- $registry : CryptoRegistry
- $cache : CRM_Utils_Cache_Interface = null
Tags
Return values
CiviConnectgenerateCreds()
Generate a new key-pair to identify the current deployment.
public
generateCreds() : static
Return values
staticgetCreds()
Find or create the connection parameters for CiviConnect bridge service.
public
getCreds() : array<string|int, mixed>
Return values
array<string|int, mixed> —Tuple: [clientId, clientSecret]
getHosts()
Get a list of available bridge servers.
public
getHosts() : array<string|int, mixed>
Return values
array<string|int, mixed>getId()
public
getId() : string|null
Return values
string|nullisRegistered()
public
isRegistered(string $authorizeUrl[, string|null $redirectUri = null ]) : void
Parameters
- $authorizeUrl : string
-
Ex: 'https://connect.civicrm.org/foobar/authorize
- $redirectUri : string|null = null
-
Ex: 'https://savewahles.org/civicrm/oauth-client/return'
Tags
register()
public
register(string $serviceUrl[, string|null $redirectUri = null ]) : void
Parameters
- $serviceUrl : string
-
Ex: 'https://connect.civicrm.org/
- $redirectUri : string|null = null
-
Ex: 'https://savewahles.org/civicrm/oauth-client/return'
Tags
createRegistration()
Generate metadata/registration record for our key-pair.
protected
createRegistration() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>createId()
private
createId(string $keyPair) : string
Parameters
- $keyPair : string