mirror of
				https://github.com/webmasterskaya/joomla-oauth-server.git
				synced 2025-10-31 07:43:22 +03:00 
			
		
		
		
	throw on save error
This commit is contained in:
		
							parent
							
								
									665f4ac2d4
								
							
						
					
					
						commit
						0caade0e28
					
				| @ -74,7 +74,10 @@ class AccessTokenRepository implements AccessTokenRepositoryInterface | ||||
|         $data['client_id'] = $client->id; | ||||
|         unset($data['client_identifier']); | ||||
| 
 | ||||
|         $this->accessTokenModel->save($data); | ||||
|         if (!$this->accessTokenModel->save($data)) | ||||
|         { | ||||
|             throw new \RuntimeException($this->accessTokenModel->getError()); | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
|     public function revokeAccessToken($tokenId): void | ||||
| @ -86,7 +89,7 @@ class AccessTokenRepository implements AccessTokenRepositoryInterface | ||||
|      * @param   string  $tokenId | ||||
|      * | ||||
|      * @throws \Exception | ||||
|      * @since version | ||||
|      * @since        version | ||||
|      * @noinspection PhpPossiblePolymorphicInvocationInspection | ||||
|      */ | ||||
|     public function isAccessTokenRevoked($tokenId): bool | ||||
|  | ||||
| @ -70,7 +70,10 @@ class AuthCodeRepository implements AuthCodeRepositoryInterface | ||||
|         $data['client_id'] = $client->id; | ||||
|         unset($data['client_identifier']); | ||||
| 
 | ||||
|         $this->authCodeModel->save($data); | ||||
|         if (!$this->authCodeModel->save($data)) | ||||
|         { | ||||
|             throw new \RuntimeException($this->authCodeModel->getError()); | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
|     public function revokeAuthCode($codeId): void | ||||
| @ -82,7 +85,7 @@ class AuthCodeRepository implements AuthCodeRepositoryInterface | ||||
|      * @param   string  $codeId | ||||
|      * | ||||
|      * @throws \Exception | ||||
|      * @since version | ||||
|      * @since        version | ||||
|      * @noinspection PhpPossiblePolymorphicInvocationInspection | ||||
|      */ | ||||
|     public function isAuthCodeRevoked($codeId): bool | ||||
|  | ||||
| @ -72,7 +72,10 @@ class RefreshTokenRepository implements RefreshTokenRepositoryInterface | ||||
|         unset($data['access_token_identifier']); | ||||
|         $data['access_token_id'] = $accessToken->id; | ||||
| 
 | ||||
|         $this->refreshTokenModel->save($data); | ||||
|         if (!$this->refreshTokenModel->save($data)) | ||||
|         { | ||||
|             throw new \RuntimeException($this->refreshTokenModel->getError()); | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
|     public function revokeRefreshToken($tokenId): void | ||||
| @ -84,7 +87,7 @@ class RefreshTokenRepository implements RefreshTokenRepositoryInterface | ||||
|      * @param   string  $tokenId | ||||
|      * | ||||
|      * @throws \Exception | ||||
|      * @since version | ||||
|      * @since        version | ||||
|      * @noinspection PhpPossiblePolymorphicInvocationInspection | ||||
|      */ | ||||
|     public function isRefreshTokenRevoked($tokenId): bool | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user