PHP Class AuthBucket\OAuth2\ResponseType\AbstractResponseTypeHandler

Author: Wong Hoi Sing Edison ([email protected])
Inheritance: implements AuthBucket\OAuth2\ResponseType\ResponseTypeHandlerInterface
Show file Open project: authbucket/oauth2

Protected Properties

Property Type Description
$modelManagerFactory
$tokenStorage
$tokenTypeHandlerFactory
$validator

Public Methods

Method Description
__construct ( Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface $tokenStorage, Symfony\Component\Validator\Validator\ValidatorInterface $validator, AuthBucket\OAuth2\Model\ModelManagerFactoryInterface $modelManagerFactory, AuthBucket\OAuth2\TokenType\TokenTypeHandlerFactoryInterface $tokenTypeHandlerFactory )

Protected Methods

Method Description
checkClientId ( Request $request ) : string Fetch cliend_id from GET.
checkRedirectUri ( Request $request, string $clientId ) : string Fetch redirect_uri from GET.
checkScope ( Request $request, $clientId, $username, $redirectUri, $state )
checkState ( Request $request, $redirectUri )
checkUsername ( ) : string Fetch username from authenticated token.

Method Details

__construct() public method

public __construct ( Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface $tokenStorage, Symfony\Component\Validator\Validator\ValidatorInterface $validator, AuthBucket\OAuth2\Model\ModelManagerFactoryInterface $modelManagerFactory, AuthBucket\OAuth2\TokenType\TokenTypeHandlerFactoryInterface $tokenTypeHandlerFactory )
$tokenStorage Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface
$validator Symfony\Component\Validator\Validator\ValidatorInterface
$modelManagerFactory AuthBucket\OAuth2\Model\ModelManagerFactoryInterface
$tokenTypeHandlerFactory AuthBucket\OAuth2\TokenType\TokenTypeHandlerFactoryInterface

checkClientId() protected method

Fetch cliend_id from GET.
protected checkClientId ( Request $request ) : string
$request Symfony\Component\HttpFoundation\Request Incoming request object
return string Supplied client_id from incoming request

checkRedirectUri() protected method

Fetch redirect_uri from GET.
protected checkRedirectUri ( Request $request, string $clientId ) : string
$request Symfony\Component\HttpFoundation\Request Incoming request object
$clientId string Corresponding client_id that code should belongs to
return string The supplied redirect_uri from incoming request, or from stored record

checkScope() protected method

protected checkScope ( Request $request, $clientId, $username, $redirectUri, $state )
$request Symfony\Component\HttpFoundation\Request

checkState() protected method

protected checkState ( Request $request, $redirectUri )
$request Symfony\Component\HttpFoundation\Request

checkUsername() protected method

Fetch username from authenticated token.
protected checkUsername ( ) : string
return string Supplied username from authenticated token

Property Details

$modelManagerFactory protected property

protected $modelManagerFactory

$tokenStorage protected property

protected $tokenStorage

$tokenTypeHandlerFactory protected property

protected $tokenTypeHandlerFactory

$validator protected property

protected $validator