mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-12-27 15:30:24 +05:30
Set the DB interface
This commit is contained in:
parent
7bca63a18f
commit
fdbd99c5c6
30
src/oauth2server/DbInterface.php
Normal file
30
src/oauth2server/DbInterface.php
Normal file
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
interface OAuth2ServerDatabase
|
||||
{
|
||||
public function validateClient(string $clientId, $clientSecret, $redirectUri);
|
||||
|
||||
public function newSession(string $clientId, string $redirectUri, string $type = 'user', string $typeId, $authCode, $accessToken, string $stage = 'request');
|
||||
|
||||
public function updateSession(string $clientId, string $type = 'user', string $typeId, $authCode, $accessToken, string $stage);
|
||||
|
||||
public function deleteSession(string $clientId, string $typeId);
|
||||
|
||||
public function validateAuthCode(string $clientId, string $redirectUri, string $authCode);
|
||||
|
||||
public function getAccessToken(int $sessionId);
|
||||
|
||||
public function removeAuthCode(int $sessionId);
|
||||
|
||||
public function setAccessToken(int $sessionId, string $accessToken);
|
||||
|
||||
public function addSessionScope(int $sessionId, string $scope);
|
||||
|
||||
public function getScope(string $scope);
|
||||
|
||||
public function updateSessionScopeAccessToken(int $sesstionId, string $accessToken);
|
||||
|
||||
public function accessTokenScopes(string $accessToken);
|
||||
|
||||
public function validateUser(string $username, string $password);
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace LNCD\OAuth2server;
|
||||
|
||||
interface OAuth2ServerDatabase
|
||||
{
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user