Package com.atlassian.bamboo.security
Class SecureTokenServiceImpl
java.lang.Object
com.atlassian.bamboo.security.SecureTokenServiceImpl
- All Implemented Interfaces:
SecureTokenService
-
Field Summary
Fields inherited from interface com.atlassian.bamboo.security.SecureTokenService
BEAN_NAME
-
Constructor Summary
ModifierConstructorDescriptionprotected
SecureTokenServiceImpl
(FeatureManager featureManager, XStreamObjectPersister persister, SecretEncryptionService secretEncryptionService) SecureTokenServiceImpl
(XStreamFactory xStreamFactory, FeatureManager featureManager, SecretEncryptionService secretEncryptionService) -
Method Summary
Modifier and TypeMethodDescription@NotNull SecureToken
Generates aSecureToken
for a givenKey
void
invalidate
(@NotNull Key key) Invalidates theSecureToken
for the givenKey
boolean
isValid
(@NotNull SecureToken tokenToValidate) Checks if the givenSecureToken
is validboolean
isValid
(@NotNull SecureToken tokenToValidate, @NotNull Key key) Checks if the givenSecureToken
is valid for givenKey
void
Restore tokens on server restart.
-
Constructor Details
-
SecureTokenServiceImpl
@TestOnly protected SecureTokenServiceImpl(FeatureManager featureManager, XStreamObjectPersister persister, SecretEncryptionService secretEncryptionService) -
SecureTokenServiceImpl
public SecureTokenServiceImpl(XStreamFactory xStreamFactory, FeatureManager featureManager, SecretEncryptionService secretEncryptionService)
-
-
Method Details
-
generate
Description copied from interface:SecureTokenService
Generates aSecureToken
for a givenKey
- Specified by:
generate
in interfaceSecureTokenService
- Returns:
- secureToken
-
isValid
Description copied from interface:SecureTokenService
Checks if the givenSecureToken
is valid- Specified by:
isValid
in interfaceSecureTokenService
- Returns:
- valid
-
isValid
Description copied from interface:SecureTokenService
Checks if the givenSecureToken
is valid for givenKey
- Specified by:
isValid
in interfaceSecureTokenService
- Returns:
- valid
-
invalidate
Description copied from interface:SecureTokenService
Invalidates theSecureToken
for the givenKey
- Specified by:
invalidate
in interfaceSecureTokenService
-
restoreState
public void restoreState()Restore tokens on server restart.- Specified by:
restoreState
in interfaceSecureTokenService
- Since:
- 5.10
-