public class InfinispanUserLoginFailureProvider extends Object implements UserLoginFailureProvider
Modifier and Type | Field and Description |
---|---|
protected SessionEventsSenderTransaction |
clusterEventsSenderTx |
protected org.infinispan.Cache<LoginFailureKey,SessionEntityWrapper<LoginFailureEntity>> |
loginFailureCache |
protected InfinispanChangelogBasedTransaction<LoginFailureKey,LoginFailureEntity> |
loginFailuresTx |
protected KeycloakSession |
session |
Constructor and Description |
---|
InfinispanUserLoginFailureProvider(KeycloakSession session,
RemoteCacheInvoker remoteCacheInvoker,
org.infinispan.Cache<LoginFailureKey,SessionEntityWrapper<LoginFailureEntity>> loginFailureCache) |
Modifier and Type | Method and Description |
---|---|
UserLoginFailureModel |
addUserLoginFailure(RealmModel realm,
String userId)
Adds a
UserLoginFailureModel for the given realm and user id. |
void |
close() |
UserLoginFailureModel |
getUserLoginFailure(RealmModel realm,
String userId)
Returns the
UserLoginFailureModel for the given realm and user id. |
protected void |
removeAllLocalUserLoginFailuresEvent(String realmId) |
void |
removeAllUserLoginFailures(RealmModel realm)
Removes all the
UserLoginFailureModel for the given realm. |
void |
removeUserLoginFailure(RealmModel realm,
String userId)
Removes a
UserLoginFailureModel for the given realm and user id. |
protected final KeycloakSession session
protected final org.infinispan.Cache<LoginFailureKey,SessionEntityWrapper<LoginFailureEntity>> loginFailureCache
protected final InfinispanChangelogBasedTransaction<LoginFailureKey,LoginFailureEntity> loginFailuresTx
protected final SessionEventsSenderTransaction clusterEventsSenderTx
public InfinispanUserLoginFailureProvider(KeycloakSession session, RemoteCacheInvoker remoteCacheInvoker, org.infinispan.Cache<LoginFailureKey,SessionEntityWrapper<LoginFailureEntity>> loginFailureCache)
public UserLoginFailureModel getUserLoginFailure(RealmModel realm, String userId)
UserLoginFailureProvider
UserLoginFailureModel
for the given realm and user id.getUserLoginFailure
in interface UserLoginFailureProvider
realm
- RealmModel
userId
- String
Id of the user.UserLoginFailureModel
for the given realm and user id.public UserLoginFailureModel addUserLoginFailure(RealmModel realm, String userId)
UserLoginFailureProvider
UserLoginFailureModel
for the given realm and user id.addUserLoginFailure
in interface UserLoginFailureProvider
realm
- RealmModel
userId
- String
Id of the user.UserLoginFailureModel
.public void removeUserLoginFailure(RealmModel realm, String userId)
UserLoginFailureProvider
UserLoginFailureModel
for the given realm and user id.removeUserLoginFailure
in interface UserLoginFailureProvider
realm
- RealmModel
userId
- String
Id of the user.public void removeAllUserLoginFailures(RealmModel realm)
UserLoginFailureProvider
UserLoginFailureModel
for the given realm.removeAllUserLoginFailures
in interface UserLoginFailureProvider
realm
- RealmModel
protected void removeAllLocalUserLoginFailuresEvent(String realmId)
Copyright © 2021 JBoss by Red Hat. All rights reserved.