formatting

This commit is contained in:
Max Nuding 2024-04-10 11:33:44 +02:00
parent 899b034013
commit 4a3bbeec79
No known key found for this signature in database

View File

@ -335,17 +335,21 @@ class APnutI
return $this->makeRequest('get', $end_point, $parameters, $content_type, $follow_redirect); return $this->makeRequest('get', $end_point, $parameters, $content_type, $follow_redirect);
} }
public function getAuthURL() public function getAuthURL($append_redirect_query_string = null)
{ {
$url = $this->auth_url $redirect_uri = $this->redirect_uri;
. '?client_id=' if (!empty($append_redirect_query_string)) {
. $this->client_id $redirect_uri .= $append_redirect_query_string;
. '&redirect_uri=' }
. urlencode($this->redirect_uri) $url = $this->auth_url
. '&scope='.$this->needed_scope . '?client_id='
. '&response_type=code'; . $this->client_id
$this->logger->debug('Auth URL: ' . $url); . '&redirect_uri='
return $url; . urlencode($redirect_uri)
. '&scope='.$this->needed_scope
. '&response_type=code';
$this->logger->debug('Auth URL: ' . $url);
return $url;
} }
//TODO: Ping server and validate token //TODO: Ping server and validate token