Class PersistentAuthenticationTokenStorage
- java.lang.Object
-
- jetbrains.buildServer.serverSide.auth.impl.AbstractAuthenticationTokenStorage
-
- jetbrains.buildServer.serverSide.auth.impl.PersistentAuthenticationTokenStorage
-
- All Implemented Interfaces:
AuthenticationTokenStorage
public class PersistentAuthenticationTokenStorage extends AbstractAuthenticationTokenStorage
- Author:
- Dmitrii Bogdanov
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface jetbrains.buildServer.serverSide.auth.AuthenticationTokenStorage
AuthenticationTokenStorage.AlreadyExists, AuthenticationTokenStorage.CreationException, AuthenticationTokenStorage.DeletionException, AuthenticationTokenStorage.InvalidTokenName, AuthenticationTokenStorage.TokenDescriptor, AuthenticationTokenStorage.TokenException, AuthenticationTokenStorage.TooManyTokens
-
-
Constructor Summary
Constructors Constructor Description PersistentAuthenticationTokenStorage(SQLRunnerEx sqlRunner, NumericIdSequences idSequences, TimeService timeService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
count()
int
countByOwnerId(long userId)
void
delete(long userId, String name)
void
deleteAll()
void
deleteAll(long userId)
List<jetbrains.buildServer.serverSide.auth.impl.PersistentAuthenticationTokenStorage.ShortTokenEntity>
deleteExpiredChunk(Integer limit)
List<jetbrains.buildServer.serverSide.auth.impl.PersistentAuthenticationTokenStorage.ShortTokenEntity>
deletePermissionsAndTokenByProjectId(String projectId)
boolean
exists(ParsedToken token)
AuthenticationToken
find(String identifier)
AuthenticationToken
find(String identifier, String value)
Collection<AuthenticationToken>
findAll(long userId)
void
store(AuthenticationToken token)
void
updateLastAccessInfo(String identifier, Date lastAccessDate, String lastAccessRemoteAddress)
-
Methods inherited from class jetbrains.buildServer.serverSide.auth.impl.AbstractAuthenticationTokenStorage
hasReachedMaximumNumberOfTokens
-
-
-
-
Constructor Detail
-
PersistentAuthenticationTokenStorage
public PersistentAuthenticationTokenStorage(@NotNull SQLRunnerEx sqlRunner, @NotNull NumericIdSequences idSequences, @NotNull TimeService timeService)
-
-
Method Detail
-
findAll
@NotNull public Collection<AuthenticationToken> findAll(long userId)
-
count
public int count()
-
updateLastAccessInfo
public void updateLastAccessInfo(@NotNull String identifier, @NotNull Date lastAccessDate, @Nullable String lastAccessRemoteAddress)
-
deleteAll
public void deleteAll()
-
delete
public void delete(long userId, @NotNull String name)
-
deleteAll
public void deleteAll(long userId)
-
deletePermissionsAndTokenByProjectId
@NotNull public List<jetbrains.buildServer.serverSide.auth.impl.PersistentAuthenticationTokenStorage.ShortTokenEntity> deletePermissionsAndTokenByProjectId(@NotNull String projectId)
-
deleteExpiredChunk
@NotNull public List<jetbrains.buildServer.serverSide.auth.impl.PersistentAuthenticationTokenStorage.ShortTokenEntity> deleteExpiredChunk(@Nullable Integer limit)
-
find
@Nullable public AuthenticationToken find(@NotNull String identifier)
-
find
@Nullable public AuthenticationToken find(@NotNull String identifier, @NotNull String value)
-
exists
public boolean exists(@NotNull ParsedToken token)
-
store
public void store(@NotNull AuthenticationToken token)
-
countByOwnerId
public int countByOwnerId(long userId)
- Returns:
- number of NOT expired tokens instead of ALL user tokens
-
-