Interface AuthenticationToken
-
- All Superinterfaces:
ParsedToken
- All Known Implementing Classes:
AuthenticationTokenAuditFinder.AuthenticationTokenAuditItem,Token
public interface AuthenticationToken extends ParsedToken
- Author:
- Dmitrii Bogdanov
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceAuthenticationToken.LastAccessInfostatic classAuthenticationToken.PermissionsRestrictionHolds permissions limit for the token
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description DategetCreationTime()DategetExpirationTime()StringgetName()longgetOwnerId()AuthenticationToken.PermissionsRestrictiongetPermissionsRestriction()AuthenticationToken.LastAccessInfogetTokenLastAccessInfo()booleanisConsistent(SUser owner)Check for internal consistence of permission restrictions with token owner permissionsvoidsetTokenLastAccessInfo(String lastAccessRemoteAddress)Sets last access IP address with last access date in pair-
Methods inherited from interface jetbrains.buildServer.serverSide.auth.ParsedToken
getIdentifier, getValue
-
-
-
-
Method Detail
-
getOwnerId
long getOwnerId()
- Returns:
- id of the user owning this token
-
getName
@NotNull String getName()
- Returns:
- name of the token
-
getCreationTime
@NotNull Date getCreationTime()
- Returns:
- date when this token was created
-
getExpirationTime
@NotNull Date getExpirationTime()
- Returns:
- date when this token will expire
-
getTokenLastAccessInfo
@NotNull AuthenticationToken.LastAccessInfo getTokenLastAccessInfo()
- Returns:
- information about lats usage of this token
-
setTokenLastAccessInfo
void setTokenLastAccessInfo(@Nullable String lastAccessRemoteAddress)Sets last access IP address with last access date in pair- Parameters:
lastAccessRemoteAddress- IP address associated with last usage of this token
-
getPermissionsRestriction
@Nullable AuthenticationToken.PermissionsRestriction getPermissionsRestriction()
- Returns:
- null if this token should have same permissions as the owner. If not null - token will have only the intersection of permissions from owner and the limit.
-
isConsistent
boolean isConsistent(@NotNull SUser owner)Check for internal consistence of permission restrictions with token owner permissions- Parameters:
owner-SUserowner of the token- Returns:
- false if permission restriction has permissions that are not assigned to user or if the user is not the owner of the token
- Since:
- 2020.2
-
-