Documentation

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

Methods

createAuthToken()

public createAuthToken([array<string|int, mixed> $claims = [] ]) : string
Parameters
$claims : array<string|int, mixed> = []
Return values
string

generateCreds()

Generate a new key-pair to identify the current deployment.

public generateCreds() : static
Return values
static

getCreds()

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|null

isRegistered()

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
throws
GuzzleException

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
throws
GuzzleException

createRegistration()

Generate metadata/registration record for our key-pair.

protected createRegistration() : array<string|int, mixed>
Tags
see
CryptoRegistry::addKey()
Return values
array<string|int, mixed>

createId()

private createId(string $keyPair) : string
Parameters
$keyPair : string
Return values
string

        
On this page

Search results