Added getCookieParameter method

This commit is contained in:
Alex Bilbie 2016-02-12 09:59:59 +00:00
parent 38a7e53cb5
commit 0b6bcad9fb

View File

@ -264,6 +264,20 @@ abstract class AbstractGrant implements GrantTypeInterface
return (isset($request->getQueryParams()[$parameter])) ? $request->getQueryParams()[$parameter] : $default;
}
/**
* Retrieve cookie parameter.
*
* @param string $parameter
* @param \Psr\Http\Message\ServerRequestInterface $request
* @param mixed $default
*
* @return null|string
*/
protected function getCookieParameter($parameter, ServerRequestInterface $request, $default = null)
{
return (isset($request->getCookieParams()[$parameter])) ? $request->getCookieParams()[$parameter] : $default;
}
/**
* Retrieve server parameter.
*