\OAuth2\TokenTypeBearer

Summary

Methods
Properties
Constants
__construct()
getTokenType()
requestHasToken()
getAccessTokenParameter()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$config
N/A

Properties

$config

$config : 

Type

Methods

__construct()

__construct(array  $config = array()) 

Parameters

array $config

getTokenType()

getTokenType() 

Token type identification string

ex: "bearer" or "mac"

requestHasToken()

requestHasToken(\OAuth2\RequestInterface  $request) 

Check if the request has supplied token

Parameters

\OAuth2\RequestInterface $request

getAccessTokenParameter()

getAccessTokenParameter(\OAuth2\RequestInterface  $request, \OAuth2\ResponseInterface  $response) 

This is a convenience function that can be used to get the token, which can then be passed to getAccessTokenData(). The constraints specified by the draft are attempted to be adheared to in this method.

As per the Bearer spec (draft 8, section 2) - there are three ways for a client to specify the bearer token, in order of preference: Authorization Header, POST and GET.

NB: Resource servers MUST accept tokens via the Authorization scheme (http://tools.ietf.org/html/rfc6750#section-2).

Parameters

\OAuth2\RequestInterface $request
\OAuth2\ResponseInterface $response