Interface JwtAuthorityRepository
-
- All Known Implementing Classes:
InMemoryJwtAuthorityRepositoryManagedObjectSource,InMemoryJwtAuthorityRepositoryManagedObjectSource
public interface JwtAuthorityRepositoryJWT repository.- Author:
- Daniel Sagenschneider
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceJwtAuthorityRepository.ClusterCriticalSectionCritical section logic for the cluster.static interfaceJwtAuthorityRepository.RetrieveKeysContextContext for retrieving keys.static interfaceJwtAuthorityRepository.SaveKeysContextContext for saving keys.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voiddoClusterCriticalSection(JwtAuthorityRepository.ClusterCriticalSection clusterCriticalSection)Allows overriding to take distributed locks within the cluster to avoid duplicate keys being generated.java.util.List<JwtAccessKey>retrieveJwtAccessKeys(JwtAuthorityRepository.RetrieveKeysContext context)Retrieves the list ofJwtAccessKeyinstances.java.util.List<JwtRefreshKey>retrieveJwtRefreshKeys(JwtAuthorityRepository.RetrieveKeysContext context)Retrieves the list ofJwtRefreshKeyinstances.voidsaveJwtAccessKeys(JwtAuthorityRepository.SaveKeysContext context, JwtAccessKey... accessKeys)Saves newJwtAccessKeyinstances.voidsaveJwtRefreshKeys(JwtAuthorityRepository.SaveKeysContext context, JwtRefreshKey... refreshKeys)Saves newJwtRefreshKeyinstances.
-
-
-
Method Detail
-
retrieveJwtAccessKeys
java.util.List<JwtAccessKey> retrieveJwtAccessKeys(JwtAuthorityRepository.RetrieveKeysContext context) throws java.lang.Exception
Retrieves the list ofJwtAccessKeyinstances.- Parameters:
context-JwtAuthorityRepository.RetrieveKeysContext.- Returns:
JwtAccessKeyinstances.- Throws:
java.lang.Exception- Possible failure in retrieving theJwtAccessKeyinstances.
-
saveJwtAccessKeys
void saveJwtAccessKeys(JwtAuthorityRepository.SaveKeysContext context, JwtAccessKey... accessKeys) throws java.lang.Exception
Saves newJwtAccessKeyinstances.- Parameters:
context-JwtAuthorityRepository.SaveKeysContext.accessKeys- NewJwtAccessKeyinstances.- Throws:
java.lang.Exception- If fails to save theJwtAccessKeyinstance.
-
retrieveJwtRefreshKeys
java.util.List<JwtRefreshKey> retrieveJwtRefreshKeys(JwtAuthorityRepository.RetrieveKeysContext context) throws java.lang.Exception
Retrieves the list ofJwtRefreshKeyinstances.- Parameters:
context-JwtAuthorityRepository.RetrieveKeysContext.- Returns:
JwtRefreshKeyinstances.- Throws:
java.lang.Exception- Possible failure in retrieving theJwtRefreshKeyinstances.
-
saveJwtRefreshKeys
void saveJwtRefreshKeys(JwtAuthorityRepository.SaveKeysContext context, JwtRefreshKey... refreshKeys)
Saves newJwtRefreshKeyinstances.- Parameters:
context-JwtAuthorityRepository.SaveKeysContext.refreshKeys- NewJwtRefreshKeyinstances.- Throws:
java.lang.Exception- If fails to save theJwtRefreshKeyinstance.
-
doClusterCriticalSection
default void doClusterCriticalSection(JwtAuthorityRepository.ClusterCriticalSection clusterCriticalSection) throws java.lang.Exception
Allows overriding to take distributed locks within the cluster to avoid duplicate keys being generated. This is optional to implement.
Default is to allow duplicate keys to be created. This is handled by logic of JWT allowing multiple active keys.
- Parameters:
clusterCriticalSection-JwtAuthorityRepository.ClusterCriticalSection.- Throws:
java.lang.Exception- If fails to undertakeJwtAuthorityRepository.ClusterCriticalSection.
-
-