mirror of
https://github.com/anikeen-com/id.git
synced 2026-11-03 22:29:33 +00:00
1 parent
0f14fa1b4c
commit
5ab57dcdfe
4 files changed
+31
-5
No files matched your search
+11
-1
@@ -66,6 +66,11 @@ class AnikeenId
|
||||
*/
|
||||
private static string $refreshTokenField = 'anikeen_id_refresh_token';
|
||||
|
||||
/**
|
||||
* Anikeen ID environment mode.
|
||||
*/
|
||||
protected static ?string $mode = null;
|
||||
|
||||
/**
|
||||
* Guzzle is used to make http requests.
|
||||
*/
|
||||
@@ -110,7 +115,7 @@ class AnikeenId
|
||||
if ($redirectUri = config('services.anikeen.redirect')) {
|
||||
$this->setRedirectUri($redirectUri);
|
||||
}
|
||||
if (config('services.anikeen.mode') === 'staging') {
|
||||
if (self::getMode() === 'staging') {
|
||||
self::setBaseUrl(self::$stagingBaseUrl);
|
||||
}
|
||||
if ($baseUrl = config('services.anikeen.base_url')) {
|
||||
@@ -141,6 +146,11 @@ class AnikeenId
|
||||
return self::$accessTokenField;
|
||||
}
|
||||
|
||||
public static function getMode(): string
|
||||
{
|
||||
return config('services.anikeen.mode', 'production');
|
||||
}
|
||||
|
||||
public static function useRefreshTokenField(string $refreshTokenField): void
|
||||
{
|
||||
self::$refreshTokenField = $refreshTokenField;
|
||||
|
||||
Reference in new issue
Block a user