public class NullConcurrentSessionController extends Object implements ConcurrentSessionController
ConcurrentSessionController
.Constructor and Description |
---|
NullConcurrentSessionController() |
Modifier and Type | Method and Description |
---|---|
void |
checkAuthenticationAllowed(Authentication request)
Called by any class that wishes to know whether the current authentication request should be permitted.
|
void |
registerSuccessfulAuthentication(Authentication authentication)
Called by an
AuthenticationManager when the authentication was successful. |
public void checkAuthenticationAllowed(Authentication request) throws AuthenticationException
ConcurrentSessionController
AuthenticationManager
s before they authenticate, but could equally
include Filter
s or other interceptors that wish to confirm the ongoing validity of a previously
authenticated Authentication
.The implementation should throw a suitable exception if the user has exceeded their maximum allowed concurrent sessions.
checkAuthenticationAllowed
in interface ConcurrentSessionController
request
- the authentication request (never null
)AuthenticationException
- if the user has exceeded their maximum allowed current sessionspublic void registerSuccessfulAuthentication(Authentication authentication)
ConcurrentSessionController
AuthenticationManager
when the authentication was successful. An
implementation is expected to register the authenticated user in some sort of registry, for future concurrent
tracking via the ConcurrentSessionController.checkAuthenticationAllowed(Authentication)
method.registerSuccessfulAuthentication
in interface ConcurrentSessionController
authentication
- the successfully authenticated user (never null
)Copyright © 2015. All rights reserved.