FriendsOfSymfony/oauth2-php — pull request #67 by jeffxpx (2014-10-15 18:13:48+00:00)
Title: Implementation that would satisfy grant extensions that can specify a time limit on the access token (fixes #66)

I changed OAuth2::createAccessToken to require 3 additional parameters: $access_token_lifetime, $refresh_token, and $refresh_token_lifetime.

Previously the refresh token and access token lifetimes were determined as part of this function. Now those are passed in.

The same code that determined those lifetimes is used (i.e. getVariable(self::CONFIG__LIFETIME, but if a grant extension returns access_token_lifetime, refresh_token, or refresh_token_lifetime, that's used instead of the getVariable() result.

I've included a test that essentially duplicates the grant extension stub and shows that it works.