This could instead be handled by extension hooks in Controller::callback(). Implementors will need to be responsible for storing whatever information they require to handle the returned token (e.g. object IDs) in the session before they redirect to http://foo.com/oauth/authenticate.
Example flow with “Account” class:
Store Account.ID in session
Redirect to /oauth/authenticate (probably with the help of Helper::buildAuthorisationUrl())
Add an extension with afterGetAccessToken which can access the returned token
This could instead be handled by extension hooks in
Controller::callback()
. Implementors will need to be responsible for storing whatever information they require to handle the returned token (e.g. object IDs) in the session before they redirect tohttp://foo.com/oauth/authenticate
.Example flow with “Account” class:
Account.ID
in session/oauth/authenticate
(probably with the help ofHelper::buildAuthorisationUrl()
)afterGetAccessToken
which can access the returned tokenAccount.ID
from session, relate it to token