forked from thephpleague/oauth2-server
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix for a possible race condition. thephpleague#1306
- Loading branch information
1 parent
2ed9e5f
commit ceb14dc
Showing
3 changed files
with
118 additions
and
15 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,4 +30,26 @@ public function persistNewAuthCode(AuthCodeEntityInterface $authCodeEntity): voi | |
public function revokeAuthCode(string $codeId): void; | ||
|
||
public function isAuthCodeRevoked(string $codeId): bool; | ||
|
||
/** | ||
* Method locks an auth code in case an error occurs during the issuance of an access code. | ||
* | ||
* The storage engine should make this persistent immediately to prevent possible race conditions while issuing an access token. | ||
* | ||
* @param string $codeId | ||
* | ||
* @return void | ||
*/ | ||
public function lockAuthCode(string $codeId): bool; | ||
Check failure on line 43 in src/Repositories/AuthCodeRepositoryInterface.php GitHub Actions / Static Analysis (8.1, prefer-lowest, ubuntu-latest)
Check failure on line 43 in src/Repositories/AuthCodeRepositoryInterface.php GitHub Actions / Static Analysis (8.1, prefer-stable, ubuntu-latest)
Check failure on line 43 in src/Repositories/AuthCodeRepositoryInterface.php GitHub Actions / Static Analysis (8.2, prefer-lowest, ubuntu-latest)
Check failure on line 43 in src/Repositories/AuthCodeRepositoryInterface.php GitHub Actions / Static Analysis (8.2, prefer-stable, ubuntu-latest)
Check failure on line 43 in src/Repositories/AuthCodeRepositoryInterface.php GitHub Actions / Static Analysis (8.3, prefer-stable, ubuntu-latest)
|
||
|
||
/** | ||
* This method is used to make the auth code available again after an error occurred in the access code issuance process. | ||
* | ||
* @param string $codeId | ||
* | ||
* @return void | ||
*/ | ||
public function unlockAuthCode(string $codeId): void; | ||
|
||
public function isAuthCodeLocked(string $codeId): bool; | ||
} |
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