Diglin\Ricardo\Services\Security
Class Security
Ricardo SecurityService API
Manage Token generation
Synopsis
- // constants
- const VALIDATION_SAVE_PATH = '/apiconnect/login/saveinfo/saveinfo';
- // Inherited constants from ServiceAbstract
- const TOKEN_TYPE_ANONYMOUS = 'anonymous';
- const TOKEN_TYPE_IDENTIFIED = 'identified';
- const TOKEN_TYPE_ANTIFORGERY = 'antiforgery';
- const TOKEN_TYPE_TEMPORARY = 'temporary';
- const TOKEN_TYPE_DEFAULT = '';
- // members
- protected $_service;
- protected $_typeOfToken;
- // Inherited members from ServiceAbstract
- protected $_service;
- protected $_typeOfToken;
- // methods
- public array getAnonymousTokenCredential()
- public array getAnonymousTokenCredentialResult()
- public array getTemporaryCredential()
- public array getTemporaryCredentialResult()
- public array getTokenCredential()
- public array getTokenCredentialResult()
- public array getRefreshTokenCredential()
- public array getRefreshTokenCredentialResult()
- public array getAntiforgeryToken()
- public array getAntiforgeryTokenResult()
- // Inherited methods from ServiceAbstract
- public string getService()
- public string getTypeOfToken()
Hierarchy
Constants
Name | Value |
---|---|
VALIDATION_SAVE_PATH | '/apiconnect/login/saveinfo/saveinfo' |
TOKEN_TYPE_ANONYMOUS | 'anonymous' |
TOKEN_TYPE_IDENTIFIED | 'identified' |
TOKEN_TYPE_ANTIFORGERY | 'antiforgery' |
TOKEN_TYPE_TEMPORARY | 'temporary' |
TOKEN_TYPE_DEFAULT | '' |
Members
protected
- $_service — string
- $_service — string
- $_typeOfToken — string
- $_typeOfToken — string
Methods
public
- getAnonymousTokenCredential() — Some Ricardo API Services don't need to have a registered token like SystemService, ArticleService, SearchService, BrandingService but they need an anonymous token
- getAnonymousTokenCredentialResult() — Get the result fo the API call to get the anonymous token
- getAntiforgeryToken() — Some API methods needs an antiforgery token to prevent Man-In-The-Middle attack
- getAntiforgeryTokenResult() — Get the antiforgery token
- getRefreshTokenCredential() — After the SessionDuration timeout, the token need to be refreshed You will get a new token credential in return. If TokenExpirationDate is above of the current date, you will have to create again a temporary credential (sic!)
- getRefreshTokenCredentialResult() — Get the refreshed the token
- getTemporaryCredential() — Ask for temporary credential for very first time use. Return a validationUrl where to redirect a user to autorize the application and Temporary Key.
- getTemporaryCredentialResult() — Get the result of the temporary credential.
- getTokenCredential() — Ask for the "real" token, providing the [TEMPORARY_TOKEN] received from the method createTemporaryCredential and also as a get parameter when user is returning from the validationURl.
- getTokenCredentialResult() — Get the result of the token credential
Inherited from Diglin\Ricardo\Services\ServiceAbstract
public
- getService() — Get the current name of the API service
- getTypeOfToken() — Get the type of token needed for this service <pre> It can be: - anonymous - identified - antiforgery - empty </pre>
History
-
2014-09-28T11:22:59+02:00 (commit #3e11a2c)
Author: Sylvain Rayé (sly@diglin.com) / Commiter: Sylvain Rayé (sly@diglin.com)
Update the License to OSL v3.0, add license file, change code header and composer.json
-
2014-08-10T20:18:28+02:00 (commit #fc0e52a)
Author: Sylvain Rayé (sly@diglin.com) / Commiter: Sylvain Rayé (sly@diglin.com)
Standardize namespace use
-
2014-06-22T17:08:27+02:00 (commit #61fc8b6)
Author: Sylvain Rayé (sly@diglin.com) / Commiter: Sylvain Rayé (sly@diglin.com)
Add PhpUnit Tests for Security, SellerAccount (in progress) and System (in progress) Services. Add a way to configure the unit test, documentation exist to configure it thanks to a readme file Implement the security protocol at the manager level
-
2014-06-15T22:30:44+02:00 (commit #6b76b24)
Author: Sylvain Rayé (sly@diglin.com) / Commiter: Sylvain Rayé (sly@diglin.com)
change folders structure, add script specific for Magento to allow to install the library into it
-
2014-06-15T13:58:22+02:00 (commit #e3161ff)
Author: Sylvain Rayé (sly@diglin.com) / Commiter: Sylvain Rayé (sly@diglin.com)
init commit