mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-12-22 21:19:46 +05:30
Renamed namespace Util > Utils
This commit is contained in:
parent
027971776b
commit
a73322fb43
@ -9,7 +9,7 @@
|
||||
* @link https://github.com/thephpleague/oauth2-server
|
||||
*/
|
||||
|
||||
namespace League\OAuth2\Server\Util\KeyAlgorithm;
|
||||
namespace League\OAuth2\Server\Utils\KeyAlgorithm;
|
||||
|
||||
class DefaultAlgorithm implements KeyAlgorithmInterface
|
||||
{
|
@ -9,7 +9,7 @@
|
||||
* @link https://github.com/thephpleague/oauth2-server
|
||||
*/
|
||||
|
||||
namespace League\OAuth2\Server\Util\KeyAlgorithm;
|
||||
namespace League\OAuth2\Server\Utils\KeyAlgorithm;
|
||||
|
||||
interface KeyAlgorithmInterface
|
||||
{
|
@ -9,7 +9,7 @@
|
||||
* @link https://github.com/thephpleague/oauth2-server
|
||||
*/
|
||||
|
||||
namespace League\OAuth2\Server\Util;
|
||||
namespace League\OAuth2\Server\Utils;
|
||||
|
||||
/**
|
||||
* RedirectUri class
|
||||
@ -21,14 +21,14 @@ class RedirectUri
|
||||
*
|
||||
* @param string $uri The base URI
|
||||
* @param array $params The query string parameters
|
||||
* @param string $queryDelimeter The query string delimeter (default: "?")
|
||||
* @param string $queryDelimiter The query string delimiter (default: "?")
|
||||
*
|
||||
* @return string The updated URI
|
||||
*/
|
||||
public static function make($uri, $params = [], $queryDelimeter = '?')
|
||||
public static function make($uri, $params = [], $queryDelimiter = '?')
|
||||
{
|
||||
$uri .= (strstr($uri, $queryDelimeter) === false) ? $queryDelimeter : '&';
|
||||
$uri .= (strstr($uri, $queryDelimiter) === false) ? $queryDelimiter : '&';
|
||||
|
||||
return $uri.http_build_query($params);
|
||||
return $uri . http_build_query($params);
|
||||
}
|
||||
}
|
@ -9,16 +9,19 @@
|
||||
* @link http://github.com/php-loep/oauth2-server
|
||||
*/
|
||||
|
||||
namespace League\OAuth2\Server\Util;
|
||||
namespace League\OAuth2\Server\Utils;
|
||||
|
||||
use League\OAuth2\Server\Util\KeyAlgorithm\DefaultAlgorithm;
|
||||
use League\OAuth2\Server\Util\KeyAlgorithm\KeyAlgorithmInterface;
|
||||
use League\OAuth2\Server\Utils\KeyAlgorithm\DefaultAlgorithm;
|
||||
use League\OAuth2\Server\Utils\KeyAlgorithm\KeyAlgorithmInterface;
|
||||
|
||||
/**
|
||||
* SecureKey class
|
||||
*/
|
||||
class SecureKey
|
||||
{
|
||||
/**
|
||||
* @var KeyAlgorithmInterface
|
||||
*/
|
||||
protected static $algorithm;
|
||||
|
||||
/**
|
38
src/Utils/ServerAwareTrait.php
Normal file
38
src/Utils/ServerAwareTrait.php
Normal file
@ -0,0 +1,38 @@
|
||||
<?php
|
||||
namespace League\OAuth2\Server\Utils;
|
||||
|
||||
use League\OAuth2\Server\AbstractServer;
|
||||
|
||||
trait ServerAwareTrait
|
||||
{
|
||||
/**
|
||||
* Server
|
||||
*
|
||||
* @var \League\OAuth2\Server\AbstractServer $server
|
||||
*/
|
||||
protected $server;
|
||||
|
||||
/**
|
||||
* Set the server
|
||||
*
|
||||
* @param \League\OAuth2\Server\AbstractServer $server
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setServer(AbstractServer $server)
|
||||
{
|
||||
$this->server = $server;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the server
|
||||
*
|
||||
* @return \League\OAuth2\Server\AbstractServer
|
||||
*/
|
||||
protected function getServer()
|
||||
{
|
||||
return $this->server;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user