-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature #49 add request token event (jr-k)
This PR was squashed before being merged into the 0.1-dev branch. Discussion ---------- add request token event I've added an event to manipulate the response during /token process. Useful to add some Set-Cookie directives for example. Commits ------- 7be39ea add request token event
- Loading branch information
Showing
5 changed files
with
111 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace League\Bundle\OAuth2ServerBundle\Event; | ||
|
||
use Symfony\Component\HttpFoundation\Response; | ||
use Symfony\Contracts\EventDispatcher\Event; | ||
|
||
final class TokenRequestResolveEvent extends Event | ||
{ | ||
/** | ||
* @var Response | ||
*/ | ||
private $response; | ||
|
||
public function __construct(Response $response) | ||
{ | ||
$this->response = $response; | ||
} | ||
|
||
public function getResponse(): Response | ||
{ | ||
return $this->response; | ||
} | ||
|
||
public function setResponse(Response $response): self | ||
{ | ||
$this->response = $response; | ||
|
||
return $this; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters