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 DategetCreationTime()DategetExpirationTime()StringgetIdentifier()StringgetName()longgetOwnerId()AuthenticationToken.PermissionsRestrictiongetPermissionsRestriction()SProjectgetProjectIfAccessible(RoleScope roleScope)AuthenticationToken.LastAccessInfogetTokenLastAccessInfo()StringgetValue()booleanisConsistent(SUser owner)Check for internal consistence of permission restrictions with token owner permissionsbooleanisExpirySet()booleanisProjectAccessibleByContextUser(RoleScope roleScope)booleanisRestricted()voidsetTokenLastAccessInfo(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:
getIdentifierin interfaceParsedToken
-
getValue
@NotNull public String getValue()
- Specified by:
getValuein interfaceParsedToken
-
getName
@NotNull public String getName()
- Specified by:
getNamein interfaceAuthenticationToken- Returns:
- name of the token
-
getOwnerId
public long getOwnerId()
- Specified by:
getOwnerIdin interfaceAuthenticationToken- Returns:
- id of the user owning this token
-
isRestricted
public boolean isRestricted()
-
getCreationTime
@NotNull public Date getCreationTime()
- Specified by:
getCreationTimein interfaceAuthenticationToken- Returns:
- date when this token was created
-
getExpirationTime
@NotNull public Date getExpirationTime()
- Specified by:
getExpirationTimein interfaceAuthenticationToken- Returns:
- date when this token will expire
-
isExpirySet
public boolean isExpirySet()
-
getTokenLastAccessInfo
@NotNull public AuthenticationToken.LastAccessInfo getTokenLastAccessInfo()
- Specified by:
getTokenLastAccessInfoin interfaceAuthenticationToken- Returns:
- information about lats usage of this token
-
setTokenLastAccessInfo
public void setTokenLastAccessInfo(@Nullable String lastAccessRemoteAddress)Description copied from interface:AuthenticationTokenSets last access IP address with last access date in pair- Specified by:
setTokenLastAccessInfoin interfaceAuthenticationToken- Parameters:
lastAccessRemoteAddress- IP address associated with last usage of this token
-
getPermissionsRestriction
@Nullable public AuthenticationToken.PermissionsRestriction getPermissionsRestriction()
- Specified by:
getPermissionsRestrictionin 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:AuthenticationTokenCheck for internal consistence of permission restrictions with token owner permissions- Specified by:
isConsistentin interfaceAuthenticationToken- 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
-
getProjectIfAccessible
@Nullable public SProject getProjectIfAccessible(@NotNull RoleScope roleScope)
-
isProjectAccessibleByContextUser
public boolean isProjectAccessibleByContextUser(@NotNull RoleScope roleScope)
-
-