Package org.keycloak.models.map.storage
Interface MapStorageWithAuth<V extends AbstractEntity & UpdatableEntity,M>
-
- All Superinterfaces:
MapStorage<V,M>
public interface MapStorageWithAuth<V extends AbstractEntity & UpdatableEntity,M> extends MapStorage<V,M>
Implementing this interface signals that the store can validate credentials. This will be implemented, for example, by a store that supports SPNEGO for Kerberos authentication.- Author:
- Alexander Schwartz
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description MapKeycloakTransactionWithAuth<V,M>
createTransaction(KeycloakSession session)
Creates aMapKeycloakTransaction
object that tracks a new transaction related to this storage.boolean
supportsCredentialType(String type)
Determine which credential types a store supports.
-
-
-
Method Detail
-
supportsCredentialType
boolean supportsCredentialType(String type)
Determine which credential types a store supports. This method should be a cheap way to query the store before creating a more expensive transaction and performing an authentication.- Parameters:
type
- supported credential type by this store, for exampleCredentialModel.KERBEROS
.- Returns:
true
if the credential type is supported by this storage
-
createTransaction
MapKeycloakTransactionWithAuth<V,M> createTransaction(KeycloakSession session)
Description copied from interface:MapStorage
Creates aMapKeycloakTransaction
object that tracks a new transaction related to this storage. In case of JPA or similar, the transaction object might be supplied by the container (via JTA) or shared same across storages accessing the same database within the same session; in other cases (e.g. plain map) a separate transaction handler might be created per each storage.- Specified by:
createTransaction
in interfaceMapStorage<V extends AbstractEntity & UpdatableEntity,M>
- Returns:
- See description. Never returns
null
-
-