ePages 7.48.0 - DE_EPAGES/OAuthTokenClient/API/OAuth2/OAuth2CredentialsClient.pm

Package DE_EPAGES::OAuthTokenClient::API::OAuth2::OAuth2CredentialsClient

Client for OAuth2 credentials operations.

Base
DE_EPAGES::EPagesJ::API::Object::RestClient

Functions

create
createAndSaveCredentials
deleteCredentials
getCredentials
new

create

Factory method for a OAuth2CredentialsClient object. Initializes based on the current configuration.

Syntax
$Client = DE_EPAGES::OAuthTokenClient::API::OAuth2::OAuth2CredentialsClient->create;
Return
$Client (DE_EPAGES::OAuthTokenClient::API::OAuth2::OAuth2CredentialsClient)
OAuth2CredentialsClient object

createAndSaveCredentials

Creates OAuth2 credentials for the given shop.

Syntax
$Credentials = $self->createAndSaveCredentials($ShopGUID, $hArgs );
Example
$Credentials = $self->createAndSaveCredentials($ShopGUID, {
    name => 'MyApp'
});
Input
$ShopGUID (string)
Shop GUID
$hArgs (ref.hash)
POST body as hashref. Required key: name
Return
$Credentials (DE_EPAGES::OAuthTokenClient::API::Object::OAuth2Credentials)
Credentials object

deleteCredentials

Deletes the credentials for the given app id.

Syntax
$self->deleteCredentials($ShopGUID, $AppID);
Input
$ShopGUID (string)
shop guid
$AppID (string)
app id

getCredentials

Gets all credentials for the given shop.

Syntax
$self->getCredentials($ShopGUID);
Input
$ShopGUID (string)
shop guid
Return
$CredentialsList (ref.array)
credentials list

new

Instanciates a new OAuth2CredentialsClient.

Syntax
DE_EPAGES::OAuthTokenClient::API::OAuth2::OAuth2CredentialsClient->new(%args);
Input
%args (hash)
Input arguments. Possible keys:
  • AllCredentialsUri - url for the credentials resource - DE_EPAGES::EPagesJ::API::Object::UriTemplate
  • LogCategory - category for commlogger. Defaults to "OAuth" - string
Return
OAuth2CredentialsClient (DE_EPAGES::OAuthTokenClient::API::OAuth2::OAuth2CredentialsClient)
new instance of OAuth2CredentialsClient