Module io.inverno.mod.security.http
Class BasicAuthSessionData<A extends Authentication>
java.lang.Object
io.inverno.mod.security.http.session.BasicAuthSessionData<A>
- Type Parameters:
A- the authentication type
- All Implemented Interfaces:
AuthSessionData<A>
public class BasicAuthSessionData<A extends Authentication>
extends Object
implements AuthSessionData<A>
A basic AuthSessionData implementation.
This can be used directly as session type when authentication is the only component to store in the session.
Although possible, it is not recommended to use to implement application session data types as it would leak the authentication in the session data. Defining a specific application session data
type and an authentication type extending it and implementing AuthSessionData should then be preferred.
- Since:
- 1.13
- Author:
- Jeremy Kuhn
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the authentication stored in the session.voidsetAuthentication(A authentication) Sets the authentication in the session
-
Constructor Details
-
BasicAuthSessionData
public BasicAuthSessionData()
-
-
Method Details
-
getAuthentication
Description copied from interface:AuthSessionDataReturns the authentication stored in the session.
- Specified by:
getAuthenticationin interfaceAuthSessionData<A extends Authentication>- Returns:
- an authentication or null
-
setAuthentication
Description copied from interface:AuthSessionDataSets the authentication in the session
- Specified by:
setAuthenticationin interfaceAuthSessionData<A extends Authentication>- Parameters:
authentication- the authentication
-