forked from lexik/LexikJWTAuthenticationBundle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEvents.php
46 lines (39 loc) · 1.5 KB
/
Events.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php
namespace Lexik\Bundle\JWTAuthenticationBundle;
/**
* Events
*
* @author Dev Lexik <[email protected]>
*/
final class Events
{
/**
* Dispatched after the token generation to allow sending more data
* on the authentication success response
*/
const AUTHENTICATION_SUCCESS = 'lexik_jwt_authentication.on_authentication_success';
/**
* Dispatched after an authentication failure
*/
const AUTHENTICATION_FAILURE = 'lexik_jwt_authentication.on_authentication_failure';
/**
* Dispatched before the token payload is encoded by the configured encoder (JWTEncoder by default).
* Hook into this event to add extra fields to the payload.
*/
const JWT_CREATED = 'lexik_jwt_authentication.on_jwt_created';
/**
* Dispatched right after token string is created.
* Hook into this event to get token representation itself.
*/
const JWT_ENCODED = 'lexik_jwt_authentication.on_jwt_encoded';
/**
* Dispatched after the token payload has been decoded by the configured encoder (JWTEncoder by default).
* Hook into this event to perform additional validation on the received payload.
*/
const JWT_DECODED = 'lexik_jwt_authentication.on_jwt_decoded';
/**
* Dispatched after the token payload has been authenticated by the provider.
* Hook into this event to perform additional modification to the authenticated token using the payload.
*/
const JWT_AUTHENTICATED = 'lexik_jwt_authentication.on_jwt_authenticated';
}