First commit

This commit is contained in:
Alex Bilbie
2012-07-05 17:38:58 +01:00
parent 5a98658812
commit 7bca63a18f
6 changed files with 126 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
<?php
namespace LNCD\OAuth2server;
class AccessToken
{
function __construct()
{
}
public function get(int $sessionId)
{
// returns an access token that the user may already have (else generate a new one)
}
public function validate(string $accessToken, array $scopes)
{
// tests if an access token is valid
}
private function set(int $sessionId)
{
// generate a new access token
}
}

View File

@@ -0,0 +1,25 @@
<?php
namespace LNCD\OAuth2server;
class Client
{
protected $id;
protected $secret;
protected $redirect_uri
public function __construct()
{
}
public function validate(array $details)
{
}
public function redirectUri(string $redirectUri, array $params, $queryDelimeter = '?')
{
// Generates the redirect uri with appended params
}
}

View File

@@ -0,0 +1,16 @@
<?php
namespace LNCD\OAuth2server;
class Scope
{
public function exists(string $scope)
{
// tests if a scope exists
}
public function details($scopes)
{
}
}

View File

@@ -0,0 +1,18 @@
<?php
namespace LNCD\OAuth2server;
class Server
{
public function __construct()
{
}
public function registerDbAbstractor()
{
}
}

8
src/oauth2server/db.php Normal file
View File

@@ -0,0 +1,8 @@
<?php
namespace LNCD\OAuth2server;
interface OAuth2ServerDatabase
{
}