Package com.atlassian.bamboo.agent
Interface PerAgentTokenService
- All Known Implementing Classes:
PerAgentTokenServiceImpl
@PublicApi
public interface PerAgentTokenService
- Since:
- 9.3.1
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Deletes all tokens for a given result key created before the passed timestamp.@NotNull String
generateToken
(@NotNull String resultKey) Generates token for a given result key.boolean
Checks if token is valid for a given result key.boolean
isValidForAnyResultKey
(@NotNull String token) Checks if token is valid for any result key.
-
Method Details
-
generateToken
Generates token for a given result key.- Parameters:
resultKey
- result key- Returns:
- token
-
isValid
Checks if token is valid for a given result key.- Parameters:
resultKey
- result keytoken
- token- Returns:
- true if token is valid, false otherwise
-
isValidForAnyResultKey
Checks if token is valid for any result key. This method was created to support backward compatibility with the old (non version 5) agent bootstrap.- Parameters:
token
- token- Returns:
- true if token is valid, false otherwise
-
delete
Deletes all tokens for a given result key created before the passed timestamp.- Parameters:
resultKey
- result keydueTimestamp
- due timestamp
-