From 8a441317d918e8ea7262cfe73722c46ff4f23fa5 Mon Sep 17 00:00:00 2001 From: Alex Bilbie Date: Thu, 10 Mar 2016 19:35:46 +0000 Subject: [PATCH] Removed old docs --- auth-server-customisation.md | 9 ----- implementing-storage-classes.md | 60 --------------------------------- 2 files changed, 69 deletions(-) delete mode 100755 auth-server-customisation.md delete mode 100755 implementing-storage-classes.md diff --git a/auth-server-customisation.md b/auth-server-customisation.md deleted file mode 100755 index bb703521..00000000 --- a/auth-server-customisation.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -layout: default -title: Authorization server customisation -permalink: /authorization-server/customisation/ ---- - -# Authorization server customisation - -## TODO \ No newline at end of file diff --git a/implementing-storage-classes.md b/implementing-storage-classes.md deleted file mode 100755 index b467498b..00000000 --- a/implementing-storage-classes.md +++ /dev/null @@ -1,60 +0,0 @@ ---- -layout: default -title: Installation -permalink: /implementing-storage-interfaces/ ---- - -# Implementing the storage interfaces - -In order to use both the resource server and authorization server you need to implement a number of interfaces. - -If you are using the resource server you need to implement the following interfaces: - -* `League\OAuth2\Server\Storage\SessionInterface` - contains methods for retrieving and setting sessions -* `League\OAuth2\Server\Storage\AccessTokenInterface` - contains methods for retrieving, creating and deleting access tokens -* `League\OAuth2\Server\Storage\ClientInterface` - single method to get a client -* `League\OAuth2\Server\Storage\ScopeInterface` - single method to get a scope - -If you are using the authorization server you need to implement the following interfaces: - -* `League\OAuth2\Server\Storage\SessionInterface` - contains methods for retrieving and setting sessions -* `League\OAuth2\Server\Storage\AccessTokenInterface` - contains methods for retrieving, creating and deleting access tokens -* `League\OAuth2\Server\Storage\ClientInterface` - single method to get a client -* `League\OAuth2\Server\Storage\ScopeInterface` - single method to get a scope - -If you are using the authorization code grant you also need to implement: - -* `League\OAuth2\Server\Storage\AuthCodeInterface` - contains methods for retrieving, creating and deleting authorization codes - -If you are using the refresh token grant you also need to implement: - -* `League\OAuth2\Server\Storage\RefreshTokenInterface` - contains methods for retrieving, creating and deleting refresh tokens - -Once you have written your class implementations then inject them into the server like so: - -~~~ php -// Resource server -$sessionStorage = new Storage\SessionStorage(); -$accessTokenStorage = new Storage\AccessTokenStorage(); -$clientStorage = new Storage\ClientStorage(); -$scopeStorage = new Storage\ScopeStorage(); - -$server = new ResourceServer( - $sessionStorage, - $accessTokenStorage, - $clientStorage, - $scopeStorage -); - -// Authorization server -$server->setSessionStorage(new Storage\SessionStorage); -$server->setAccessTokenStorage(new Storage\AccessTokenStorage); -$server->setRefreshTokenStorage(new Storage\RefreshTokenStorage); -$server->setClientStorage(new Storage\ClientStorage); -$server->setScopeStorage(new Storage\ScopeStorage); -$server->setAuthCodeStorage(new Storage\AuthCodeStorage); -~~~ - -If you are using a relational database you can find some example storage implementations in the `examples/relational` folder in the codebase. - -You don't have to use a database to store all of your settings