public class InfinispanOAuth2DeviceTokenStoreProvider extends Object implements OAuth2DeviceTokenStoreProvider
Modifier and Type | Field and Description |
---|---|
static org.jboss.logging.Logger |
logger |
Constructor and Description |
---|
InfinispanOAuth2DeviceTokenStoreProvider(KeycloakSession session,
Supplier<org.infinispan.commons.api.BasicCache<String,ActionTokenValueEntity>> actionKeyCache) |
Modifier and Type | Method and Description |
---|---|
boolean |
approve(RealmModel realm,
String userCode,
String userSessionId)
Approve the given user code
|
void |
close() |
boolean |
deny(RealmModel realm,
String userCode)
Deny the given user code
|
OAuth2DeviceCodeModel |
getByDeviceCode(RealmModel realm,
String deviceCode)
Get the model object by the given device code
|
OAuth2DeviceCodeModel |
getByUserCode(RealmModel realm,
String userCode)
Get the model object by the given user code
|
boolean |
isPollingAllowed(OAuth2DeviceCodeModel deviceCode)
Check the device code is allowed to poll
|
void |
put(OAuth2DeviceCodeModel deviceCode,
OAuth2DeviceUserCodeModel userCode,
int lifespanSeconds)
Stores the given device code and user code
|
boolean |
removeDeviceCode(RealmModel realm,
String deviceCode)
Remove the given device code
|
boolean |
removeUserCode(RealmModel realm,
String userCode)
Remove the given user code
|
public InfinispanOAuth2DeviceTokenStoreProvider(KeycloakSession session, Supplier<org.infinispan.commons.api.BasicCache<String,ActionTokenValueEntity>> actionKeyCache)
public OAuth2DeviceCodeModel getByDeviceCode(RealmModel realm, String deviceCode)
OAuth2DeviceTokenStoreProvider
getByDeviceCode
in interface OAuth2DeviceTokenStoreProvider
public void put(OAuth2DeviceCodeModel deviceCode, OAuth2DeviceUserCodeModel userCode, int lifespanSeconds)
OAuth2DeviceTokenStoreProvider
put
in interface OAuth2DeviceTokenStoreProvider
public boolean isPollingAllowed(OAuth2DeviceCodeModel deviceCode)
OAuth2DeviceTokenStoreProvider
isPollingAllowed
in interface OAuth2DeviceTokenStoreProvider
public OAuth2DeviceCodeModel getByUserCode(RealmModel realm, String userCode)
OAuth2DeviceTokenStoreProvider
getByUserCode
in interface OAuth2DeviceTokenStoreProvider
public boolean approve(RealmModel realm, String userCode, String userSessionId)
OAuth2DeviceTokenStoreProvider
approve
in interface OAuth2DeviceTokenStoreProvider
public boolean deny(RealmModel realm, String userCode)
OAuth2DeviceTokenStoreProvider
deny
in interface OAuth2DeviceTokenStoreProvider
public boolean removeDeviceCode(RealmModel realm, String deviceCode)
OAuth2DeviceTokenStoreProvider
removeDeviceCode
in interface OAuth2DeviceTokenStoreProvider
public boolean removeUserCode(RealmModel realm, String userCode)
OAuth2DeviceTokenStoreProvider
removeUserCode
in interface OAuth2DeviceTokenStoreProvider
Copyright © 2021 JBoss by Red Hat. All rights reserved.