CiviGenericProvider
extends GenericProvider
in package
uses
ResponseModeTrait
Class CiviGenericProvider
Table of Contents
Properties
- $responseModes : array<string|int, mixed>|array<string|int, string>
- List of supported response-modes.
- $tenant : string
Methods
- getBaseAccessTokenUrl() : string
- Returns the base URL for requesting an access token.
- getBaseAuthorizationUrl() : string
- Returns the base URL for authorizing a client.
- getResponseModes() : array<string|int, mixed>
- setResponseModes() : void
- fetchResourceOwnerDetails() : mixed
- Requests resource owner details.
- fillProperties() : mixed
- getAuthorizationParameters() : mixed
- decodeUnauthenticatedJwt() : mixed
- replaceTenantToken() : string
- Replace {{tenant}} in the endpoint URLs with 'common' for consumer accounts or the tenancy ID for dedicated services.
Properties
$responseModes
List of supported response-modes.
protected
array<string|int, mixed>|array<string|int, string>
$responseModes
= ['query']
Some mix of values. At time of writing, Civi supports:
- 'query': Values returned to the
$redirectUrias query params. (Standard OAuth 2.0 behavior.) - 'web_message': Values returned via JS API:
window.opener.postMessage(params, civicrmInstanceUrl)Requires the calling page to have a listener corresponding listener forwindow.addEventListener(where e.origin==findOrigin(urlAuthorize))
Tags
$tenant
protected
string
$tenant
Methods
getBaseAccessTokenUrl()
Returns the base URL for requesting an access token.
public
getBaseAccessTokenUrl(array<string|int, mixed> $params) : string
Eg. https://oauth.service.com/token
Parameters
- $params : array<string|int, mixed>
Return values
stringgetBaseAuthorizationUrl()
Returns the base URL for authorizing a client.
public
getBaseAuthorizationUrl() : string
Eg. https://oauth.service.com/authorize
Return values
stringgetResponseModes()
public
getResponseModes() : array<string|int, mixed>
Return values
array<string|int, mixed>setResponseModes()
public
setResponseModes(array<string|int, mixed> $responseModes) : void
Parameters
- $responseModes : array<string|int, mixed>
fetchResourceOwnerDetails()
Requests resource owner details.
protected
fetchResourceOwnerDetails(AccessToken $token) : mixed
Parameters
- $token : AccessToken
fillProperties()
protected
fillProperties([array<string|int, mixed> $options = [] ]) : mixed
Parameters
- $options : array<string|int, mixed> = []
getAuthorizationParameters()
protected
getAuthorizationParameters(array<string|int, mixed> $options) : mixed
Parameters
- $options : array<string|int, mixed>
decodeUnauthenticatedJwt()
private
decodeUnauthenticatedJwt(mixed $t) : mixed
Parameters
- $t : mixed
replaceTenantToken()
Replace {{tenant}} in the endpoint URLs with 'common' for consumer accounts or the tenancy ID for dedicated services.
private
replaceTenantToken(string $str) : string
Parameters
- $str : string
-
URL to replace