Class RefreshTokenGeneratedEvent
java.lang.Object
java.util.EventObject
io.micronaut.context.event.ApplicationEvent
io.micronaut.security.token.event.RefreshTokenGeneratedEvent
- All Implemented Interfaces:
Serializable
public class RefreshTokenGeneratedEvent
extends io.micronaut.context.event.ApplicationEvent
Triggered when a JWT refresh token is generated.
- Since:
- 1.0
- Author:
- Sergio del Amo
- See Also:
-
Field Summary
Fields inherited from class EventObject
source -
Constructor Summary
ConstructorsConstructorDescriptionRefreshTokenGeneratedEvent(Authentication authentication, String refreshToken) Triggered when a refresh token is generated. -
Method Summary
Modifier and TypeMethodDescriptiontoString()The string representation never includes the refresh token.Methods inherited from class EventObject
getSource
-
Constructor Details
-
RefreshTokenGeneratedEvent
Triggered when a refresh token is generated.- Parameters:
authentication- The user detailsrefreshToken- The refresh token- Throws:
IllegalArgumentException- if source is null.
-
-
Method Details
-
getAuthentication
- Returns:
- The user details
-
getRefreshToken
- Returns:
- The refresh token
-
toString
The string representation never includes the refresh token. Micronaut logs every published event at DEBUG using its string representation, so exposing it would write the refresh token to the log.- Overrides:
toStringin classEventObject- Returns:
- The string representation of the event with the refresh token redacted.
- Since:
- 5.5.2
-