-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ce2e455
commit 5a929c9
Showing
13 changed files
with
161 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
namespace App\Http\Services; | ||
|
||
use Firebase\JWT\JWT; | ||
use Firebase\JWT\Key; | ||
|
||
class LicenseService | ||
{ | ||
public static function checkAvailableNewThread($license, $threadsCount): bool | ||
{ | ||
dd(self::decodeJWT($license)); | ||
$connections = (int)self::decodeJWT($license)->connections; | ||
return $threadsCount < $connections; | ||
} | ||
|
||
private static function decodeJWT(string $jwt): \stdClass | ||
{ | ||
return JWT::decode($jwt, new Key(config('slonik.jwt_key'), 'HS256')); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -91,7 +91,7 @@ | |
'pipelines' => [], | ||
], | ||
'locales' => [ | ||
'ru', | ||
'ru','en' | ||
], | ||
|
||
'global_search' => [ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
return [ | ||
'connections_title' => 'Connections', | ||
'last_connection' => 'Last connection', | ||
'settings' => [ | ||
'title' => 'Settings', | ||
'threads_count' => 'Threads count', | ||
'resolution' => 'Resolution', | ||
'thread_framerate' => 'Thread framerate', | ||
'highlight_active_tread' => 'Highlight active tread', | ||
'highlight_mouse_pointer_area' => 'Highlight mouse pointer area', | ||
] | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
return [ | ||
'connections_title' => 'Соединения', | ||
'last_connection' => 'Последнее подключение', | ||
'settings' => [ | ||
'title' => 'Настройки', | ||
'threads_count' => 'Количество потоков', | ||
'resolution' => 'Разрешение', | ||
'thread_framerate' => 'Частота кадров', | ||
'highlight_active_tread' => 'Подсветка активного монитора', | ||
'highlight_mouse_pointer_area' => 'Подсветка зоны указателя мыши', | ||
] | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters