Class InfinispanUserLoginFailureProvider
- java.lang.Object
-
- org.keycloak.models.sessions.infinispan.InfinispanUserLoginFailureProvider
-
- All Implemented Interfaces:
UserLoginFailureProvider
,Provider
public class InfinispanUserLoginFailureProvider extends Object implements UserLoginFailureProvider
- Author:
- Martin Kanis
-
-
Field Summary
Fields Modifier and Type Field Description protected SessionEventsSenderTransaction
clusterEventsSenderTx
protected org.infinispan.Cache<LoginFailureKey,SessionEntityWrapper<LoginFailureEntity>>
loginFailureCache
protected InfinispanChangelogBasedTransaction<LoginFailureKey,LoginFailureEntity>
loginFailuresTx
protected KeycloakSession
session
-
Constructor Summary
Constructors Constructor Description InfinispanUserLoginFailureProvider(KeycloakSession session, RemoteCacheInvoker remoteCacheInvoker, org.infinispan.Cache<LoginFailureKey,SessionEntityWrapper<LoginFailureEntity>> loginFailureCache)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description UserLoginFailureModel
addUserLoginFailure(RealmModel realm, String userId)
Adds aUserLoginFailureModel
for the given realm and user id.void
close()
UserLoginFailureModel
getUserLoginFailure(RealmModel realm, String userId)
Returns theUserLoginFailureModel
for the given realm and user id.protected void
removeAllLocalUserLoginFailuresEvent(String realmId)
void
removeAllUserLoginFailures(RealmModel realm)
Removes all theUserLoginFailureModel
for the given realm.void
removeUserLoginFailure(RealmModel realm, String userId)
Removes aUserLoginFailureModel
for the given realm and user id.
-
-
-
Field Detail
-
session
protected final KeycloakSession session
-
loginFailureCache
protected final org.infinispan.Cache<LoginFailureKey,SessionEntityWrapper<LoginFailureEntity>> loginFailureCache
-
loginFailuresTx
protected final InfinispanChangelogBasedTransaction<LoginFailureKey,LoginFailureEntity> loginFailuresTx
-
clusterEventsSenderTx
protected final SessionEventsSenderTransaction clusterEventsSenderTx
-
-
Constructor Detail
-
InfinispanUserLoginFailureProvider
public InfinispanUserLoginFailureProvider(KeycloakSession session, RemoteCacheInvoker remoteCacheInvoker, org.infinispan.Cache<LoginFailureKey,SessionEntityWrapper<LoginFailureEntity>> loginFailureCache)
-
-
Method Detail
-
getUserLoginFailure
public UserLoginFailureModel getUserLoginFailure(RealmModel realm, String userId)
Description copied from interface:UserLoginFailureProvider
Returns theUserLoginFailureModel
for the given realm and user id.- Specified by:
getUserLoginFailure
in interfaceUserLoginFailureProvider
- Parameters:
realm
-RealmModel
userId
-String
Id of the user.- Returns:
- Returns the
UserLoginFailureModel
for the given realm and user id.
-
addUserLoginFailure
public UserLoginFailureModel addUserLoginFailure(RealmModel realm, String userId)
Description copied from interface:UserLoginFailureProvider
Adds aUserLoginFailureModel
for the given realm and user id.- Specified by:
addUserLoginFailure
in interfaceUserLoginFailureProvider
- Parameters:
realm
-RealmModel
userId
-String
Id of the user.- Returns:
- Returns newly created
UserLoginFailureModel
.
-
removeUserLoginFailure
public void removeUserLoginFailure(RealmModel realm, String userId)
Description copied from interface:UserLoginFailureProvider
Removes aUserLoginFailureModel
for the given realm and user id.- Specified by:
removeUserLoginFailure
in interfaceUserLoginFailureProvider
- Parameters:
realm
-RealmModel
userId
-String
Id of the user.
-
removeAllUserLoginFailures
public void removeAllUserLoginFailures(RealmModel realm)
Description copied from interface:UserLoginFailureProvider
Removes all theUserLoginFailureModel
for the given realm.- Specified by:
removeAllUserLoginFailures
in interfaceUserLoginFailureProvider
- Parameters:
realm
-RealmModel
-
removeAllLocalUserLoginFailuresEvent
protected void removeAllLocalUserLoginFailuresEvent(String realmId)
-
-