WebUtility
in package
Web utility.
Table of Contents
Methods
- extractAccessToken() : string
- Extract an access token which is included in a request in the way defined in RFC 6750.
- extractAccessTokenFromBody() : string
- Extract an access token which is included in a request in the way defined in "2.2. Form-Encoded Body Parameter" of RFC 6750.
- extractAccessTokenFromHeader() : string
- Extract an access token which is included in a request in the way defined in "2.1. Authorization Request Header Field" of RFC 6750.
- extractAccessTokenFromQuery() : string
- Extract an access token which is included in a request in the way defined in "2.3. URI Query Parameter" of RFC 6750.
- extractRequestHeaderValue() : string
- Extract the value of a header from a request.
Methods
extractAccessToken()
Extract an access token which is included in a request in the way defined in RFC 6750.
public
static extractAccessToken(Request $request) : string
The implementation of this method searches the following locations in this order.
Parameters
- $request : Request
-
An HTTP request.
Return values
string —An access token.
extractAccessTokenFromBody()
Extract an access token which is included in a request in the way defined in "2.2. Form-Encoded Body Parameter" of RFC 6750.
public
static extractAccessTokenFromBody(Request $request) : string
Parameters
- $request : Request
-
An HTTP request.
Return values
string —An access token.
extractAccessTokenFromHeader()
Extract an access token which is included in a request in the way defined in "2.1. Authorization Request Header Field" of RFC 6750.
public
static extractAccessTokenFromHeader(Request $request) : string
Parameters
- $request : Request
-
An HTTP request.
Return values
string —An access token.
extractAccessTokenFromQuery()
Extract an access token which is included in a request in the way defined in "2.3. URI Query Parameter" of RFC 6750.
public
static extractAccessTokenFromQuery(Request $request) : string
Parameters
- $request : Request
-
An HTTP request.
Return values
string —An access token.
extractRequestHeaderValue()
Extract the value of a header from a request.
public
static extractRequestHeaderValue(Request $request, string $headerName) : string
Parameters
- $request : Request
-
An HTTP request.
- $headerName : string
-
The name of an HTTP header.
Return values
string —The value of the header. If the number of headers having the header name included in the request is 2 or more, the value of the first header is returned.