Class AuthenticationTokenAuditFinder.AuthenticationTokenAuditItem
- java.lang.Object
-
- jetbrains.buildServer.serverSide.impl.audit.finders.AuthenticationTokenAuditFinder.AuthenticationTokenAuditItem
-
- All Implemented Interfaces:
AuthenticationToken
,ParsedToken
- Enclosing class:
- AuthenticationTokenAuditFinder
public static class AuthenticationTokenAuditFinder.AuthenticationTokenAuditItem extends Object implements AuthenticationToken
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface jetbrains.buildServer.serverSide.auth.AuthenticationToken
AuthenticationToken.LastAccessInfo, AuthenticationToken.PermissionsRestriction
-
-
Constructor Summary
Constructors Constructor Description AuthenticationTokenAuditItem(AuthenticationToken authenticationToken)
AuthenticationTokenAuditItem(AuthenticationToken authenticationToken, ProjectFinder projectFinder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Date
getCreationTime()
Date
getExpirationTime()
String
getIdentifier()
String
getName()
long
getOwnerId()
AuthenticationToken.PermissionsRestriction
getPermissionsRestriction()
SProject
getProjectIfAccessible(RoleScope roleScope)
AuthenticationToken.LastAccessInfo
getTokenLastAccessInfo()
String
getValue()
boolean
isConsistent(SUser owner)
Check for internal consistence of permission restrictions with token owner permissionsboolean
isExpirySet()
boolean
isProjectAccessibleByContextUser(RoleScope roleScope)
boolean
isRestricted()
void
setTokenLastAccessInfo(String lastAccessRemoteAddress)
Sets last access IP address with last access date in pair
-
-
-
Constructor Detail
-
AuthenticationTokenAuditItem
public AuthenticationTokenAuditItem(@NotNull AuthenticationToken authenticationToken)
-
AuthenticationTokenAuditItem
public AuthenticationTokenAuditItem(@NotNull AuthenticationToken authenticationToken, @NotNull ProjectFinder projectFinder)
-
-
Method Detail
-
getIdentifier
@NotNull public String getIdentifier()
- Specified by:
getIdentifier
in interfaceParsedToken
-
getValue
@NotNull public String getValue()
- Specified by:
getValue
in interfaceParsedToken
-
getName
@NotNull public String getName()
- Specified by:
getName
in interfaceAuthenticationToken
- Returns:
- name of the token
-
getOwnerId
public long getOwnerId()
- Specified by:
getOwnerId
in interfaceAuthenticationToken
- Returns:
- id of the user owning this token
-
isRestricted
public boolean isRestricted()
-
getCreationTime
@NotNull public Date getCreationTime()
- Specified by:
getCreationTime
in interfaceAuthenticationToken
- Returns:
- date when this token was created
-
getExpirationTime
@NotNull public Date getExpirationTime()
- Specified by:
getExpirationTime
in interfaceAuthenticationToken
- Returns:
- date when this token will expire
-
isExpirySet
public boolean isExpirySet()
-
getTokenLastAccessInfo
@NotNull public AuthenticationToken.LastAccessInfo getTokenLastAccessInfo()
- Specified by:
getTokenLastAccessInfo
in interfaceAuthenticationToken
- Returns:
- information about lats usage of this token
-
setTokenLastAccessInfo
public void setTokenLastAccessInfo(@Nullable String lastAccessRemoteAddress)
Description copied from interface:AuthenticationToken
Sets last access IP address with last access date in pair- Specified by:
setTokenLastAccessInfo
in interfaceAuthenticationToken
- Parameters:
lastAccessRemoteAddress
- IP address associated with last usage of this token
-
getPermissionsRestriction
@Nullable public AuthenticationToken.PermissionsRestriction getPermissionsRestriction()
- Specified by:
getPermissionsRestriction
in interfaceAuthenticationToken
- 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
public boolean isConsistent(@NotNull SUser owner)
Description copied from interface:AuthenticationToken
Check for internal consistence of permission restrictions with token owner permissions- Specified by:
isConsistent
in interfaceAuthenticationToken
- Parameters:
owner
-SUser
owner 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
-
getProjectIfAccessible
@Nullable public SProject getProjectIfAccessible(@NotNull RoleScope roleScope)
-
isProjectAccessibleByContextUser
public boolean isProjectAccessibleByContextUser(@NotNull RoleScope roleScope)
-
-