-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
When a domain event is emitted the receiver of that event has no way to access information about for instance the access/refresh-token that was issued.
Situation
Our access tokens have a supplementary property called mfa_validated
. That property's value is either true
or false
. When issuing a new access token that was requested via a refresh token the new access token should inherit the value of that property from the previous access token.
We're unable to find out what the previous access token or refresh token was. We are also unable to find out what the new access token is. This results in our users having to redo the MFA steps when the access token is expired but the refresh token is still valid.
Proposal
League\OAuth2\Server::ACCESS_TOKEN_ISSUED
: Provide the new access token to theRequestEvent
when a new access token was issued.League\OAuth2\Server::REFRESH_TOKEN_ISSUED
: Provide the new refresh token to theRequestEvent
when a new refresh token was issued.
Or provide any other way to retrieve the access token or refresh token related to the event that was emitted.