Skip to content

Commit

Permalink
Implementing new GoTo token retrieval process (#47)
Browse files Browse the repository at this point in the history
* Implementing new authentication process, but not finished yet

* updating information in readme file

* Mini layout change
  • Loading branch information
JonasLudwig1998 committed Aug 6, 2024
1 parent 0b9297f commit 2f8a4a9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion EventListener/IntegrationRequestSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public static function getSubscribedEvents(): array
*/
public function getParameters(PluginIntegrationRequestEvent $requestEvent): void
{
if (str_contains($requestEvent->getUrl(), 'oauth/v2/token')) {
if (str_contains($requestEvent->getUrl(), 'oauth/token')) {
$authorization = $this->getAuthorization($requestEvent->getParameters());
$requestEvent->setHeaders([
'Authorization' => sprintf('Basic %s', base64_encode($authorization)),
Expand Down
9 changes: 7 additions & 2 deletions Integration/GoToAbstractIntegration.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,20 +105,25 @@ public function getApiUrl(): string
return 'https://api.getgo.com';
}

public function getAuthBaseUrl(): string
{
return 'https://authentication.logmeininc.com';
}

/**
* {@inheritdoc}
*/
public function getAccessTokenUrl(): string
{
return $this->getApiUrl().'/oauth/v2/token';
return $this->getAuthBaseUrl().'/oauth/token';
}

/**
* {@inheritdoc}
*/
public function getAuthenticationUrl(): string
{
return $this->getApiUrl().'/oauth/v2/authorize';
return $this->getAuthBaseUrl().'/oauth/authorize';
}

/**
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ We have given the GoTo plugin (for GoToWebinar / GoToMeeting / GoToAssist / GoTo
* Download the plugin, say to you home directory, e.g. using wget, and prepare it

cd ~
wget https://github.com/Leuchtfeuer/mautic-goto-bundle/archive/master.zip
unzip master.zip
mv mautic-goto-bundle-master LeuchtfeuerGoToBundle
wget https://github.com/Leuchtfeuer/mautic-goto-bundle/archive/[required-branch].zip
unzip [zip-filename].zip
mv [filename] LeuchtfeuerGoToBundle

* copy plugin to the Mautic installation

Expand Down Expand Up @@ -60,7 +60,7 @@ We have given the GoTo plugin (for GoToWebinar / GoToMeeting / GoToAssist / GoTo

## Apply Authorization
* Paste Client ID and Client Secret into the plugin settings in Mautic
* Now click "Authorize App", log in to GoToWebinar (if requested), and confirm
* Now click "Authorize App", log in to GoToWebinar (if requested), and confirm (it might be necessary to enable pop-ups and redirects in your browser for this step to work)

## Set up Syncing
* Try a first manual Sync:
Expand Down

0 comments on commit 2f8a4a9

Please sign in to comment.