mirror of
https://github.com/elyby/oauth2-server.git
synced 2025-01-18 17:42:54 +05:30
Updated PSR compliance. Added Illuminate\Support\Facades\DB namespace
This commit is contained in:
parent
4d36ebd3e7
commit
32a7ed38a9
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace League\OAuth2\Server\Storage\Fluent;
|
namespace League\OAuth2\Server\Storage\Fluent;
|
||||||
|
|
||||||
|
use \Illuminate\Support\Facades\DB as DB;
|
||||||
use \League\OAuth2\Server\Storage\ClientInterface;
|
use \League\OAuth2\Server\Storage\ClientInterface;
|
||||||
|
|
||||||
class Client implements ClientInterface {
|
class Client implements ClientInterface {
|
||||||
@ -14,16 +15,12 @@ class Client implements ClientInterface {
|
|||||||
->where('oauth_clients.id', $clientId)
|
->where('oauth_clients.id', $clientId)
|
||||||
->where('oauth_client_endpoints.redirect_uri', $redirectUri)
|
->where('oauth_client_endpoints.redirect_uri', $redirectUri)
|
||||||
->first();
|
->first();
|
||||||
}
|
} elseif ( ! is_null($clientSecret) && is_null($redirectUri)) {
|
||||||
|
|
||||||
elseif ( ! is_null($clientSecret) && is_null($redirectUri)) {
|
|
||||||
$result = DB::table('oauth_clients')
|
$result = DB::table('oauth_clients')
|
||||||
->where('id', $clientId)
|
->where('id', $clientId)
|
||||||
->where('secret', $clientSecret)
|
->where('secret', $clientSecret)
|
||||||
->first();
|
->first();
|
||||||
}
|
} elseif ( ! is_null($clientSecret) && ! is_null($redirectUri)) {
|
||||||
|
|
||||||
elseif ( ! is_null($clientSecret) && ! is_null($redirectUri)) {
|
|
||||||
$result = DB::table('oauth_clients')
|
$result = DB::table('oauth_clients')
|
||||||
->join('oauth_client_endpoints', 'oauth_clients.id', '=', 'oauth_client_endpoints.client_id')
|
->join('oauth_client_endpoints', 'oauth_clients.id', '=', 'oauth_client_endpoints.client_id')
|
||||||
->where('oauth_clients.id', $clientId)
|
->where('oauth_clients.id', $clientId)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user