Skip to content

Commit 371b6f5

Browse files
committed
Moves OAuth URL to Provider:__construct to support overriding the URL.
1 parent 0c8857c commit 371b6f5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Kobas/APIClient/Auth/Provider.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class Provider
3939
/**
4040
* @var string
4141
*/
42-
protected $url = 'https://oauth.kobas.co.uk';
42+
protected $url;
4343

4444
/**
4545
* OAuthSigner constructor.
@@ -48,13 +48,15 @@ class Provider
4848
* @param string $clientId
4949
* @param string $clientSecret
5050
* @param string $scopes
51+
* @param string $url
5152
*/
52-
public function __construct($companyId, $clientId, $clientSecret, $scopes)
53+
public function __construct($companyId, $clientId, $clientSecret, $scopes, $url = 'https://oauth.kobas.co.uk')
5354
{
5455
$this->companyId = (int)$companyId;
5556
$this->clientId = (string)$clientId;
5657
$this->clientSecret = (string)$clientSecret;
5758
$this->scopes = (string)$scopes;
59+
$this->url = (string)$url;
5860
}
5961

6062
/**

0 commit comments

Comments
 (0)