Added a check for unique access token constraint violation

This commit is contained in:
Ivan Kurnosov
2016-06-20 20:18:53 +12:00
parent 64a0fcb3a6
commit b68ef973df
4 changed files with 434 additions and 13 deletions

View File

@@ -0,0 +1,21 @@
<?php
/**
* @author Ivan Kurnosov <zerkms@zerkms.com>
* @copyright Copyright (c) Alex Bilbie
* @license http://mit-license.org/
*
* @link https://github.com/thephpleague/oauth2-server
*/
namespace League\OAuth2\Server\Exception;
class UniqueTokenIdentifierConstraintViolationException extends OAuthServerException
{
public static function create()
{
$errorMessage = 'Could not create unique access token identifier';
return new static($errorMessage, 100, 'access_token_duplicate', 500);
}
}