Interface AuthenticationTokenStorage
-
- All Known Implementing Classes:
AbstractAuthenticationTokenStorage,PersistentAuthenticationTokenStorage
public interface AuthenticationTokenStorage- Author:
- Dmitrii Bogdanov
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classAuthenticationTokenStorage.AlreadyExistsstatic classAuthenticationTokenStorage.CreationExceptionstatic classAuthenticationTokenStorage.DeletionExceptionstatic classAuthenticationTokenStorage.InvalidTokenNamestatic interfaceAuthenticationTokenStorage.TokenDescriptorstatic classAuthenticationTokenStorage.TokenExceptionstatic classAuthenticationTokenStorage.TooManyTokens
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intcount()intcountByOwnerId(long userId)voiddelete(long userId, String name)voiddeleteAll()voiddeleteAll(long userId)List<? extends AuthenticationTokenStorage.TokenDescriptor>deleteExpiredChunk(Integer limit)List<? extends AuthenticationTokenStorage.TokenDescriptor>deletePermissionsAndTokenByProjectId(String projectId)booleanexists(ParsedToken token)AuthenticationTokenfind(String identifier)AuthenticationTokenfind(String identifier, String value)Collection<AuthenticationToken>findAll(long userId)booleanhasReachedMaximumNumberOfTokens(long userId)voidstore(AuthenticationToken token)voidupdateLastAccessInfo(String identifier, Date lastAccessDate, String lastAccessRemoteAddress)
-
-
-
Method Detail
-
findAll
@NotNull Collection<AuthenticationToken> findAll(long userId)
-
find
@Nullable AuthenticationToken find(@NotNull String identifier)
-
find
@Nullable AuthenticationToken find(@NotNull String identifier, @NotNull String value)
-
exists
boolean exists(@NotNull ParsedToken token)
-
count
int count()
-
countByOwnerId
int countByOwnerId(long userId)
-
updateLastAccessInfo
void updateLastAccessInfo(@NotNull String identifier, @NotNull Date lastAccessDate, @Nullable String lastAccessRemoteAddress)
-
deleteAll
void deleteAll()
-
deleteAll
void deleteAll(long userId)
-
deletePermissionsAndTokenByProjectId
@NotNull List<? extends AuthenticationTokenStorage.TokenDescriptor> deletePermissionsAndTokenByProjectId(@NotNull String projectId)
-
deleteExpiredChunk
@NotNull List<? extends AuthenticationTokenStorage.TokenDescriptor> deleteExpiredChunk(@Nullable Integer limit)
-
delete
void delete(long userId, @NotNull String name)
-
store
void store(@NotNull AuthenticationToken token)
-
hasReachedMaximumNumberOfTokens
boolean hasReachedMaximumNumberOfTokens(long userId)
-
-