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
ConstructorsModifierConstructorDescriptionprotectedSecureTokenServiceImpl(FeatureManager featureManager, XStreamObjectPersister persister, SecretEncryptionService secretEncryptionService) SecureTokenServiceImpl(XStreamFactory xStreamFactory, FeatureManager featureManager, SecretEncryptionService secretEncryptionService) -
Method Summary
Modifier and TypeMethodDescription@NotNull SecureTokenGenerates aSecureTokenfor a givenKeyvoidinvalidate(@NotNull Key key) Invalidates theSecureTokenfor the givenKeybooleanisValid(@NotNull SecureToken tokenToValidate) Checks if the givenSecureTokenis validbooleanisValid(@NotNull SecureToken tokenToValidate, @NotNull Key key) Checks if the givenSecureTokenis valid for givenKeyvoidRestore 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:SecureTokenServiceGenerates aSecureTokenfor a givenKey- Specified by:
generatein interfaceSecureTokenService- Parameters:
key-- Returns:
- secureToken
-
isValid
Description copied from interface:SecureTokenServiceChecks if the givenSecureTokenis valid- Specified by:
isValidin interfaceSecureTokenService- Parameters:
tokenToValidate-- Returns:
- valid
-
isValid
Description copied from interface:SecureTokenServiceChecks if the givenSecureTokenis valid for givenKey- Specified by:
isValidin interfaceSecureTokenService- Parameters:
tokenToValidate-key-- Returns:
- valid
-
invalidate
Description copied from interface:SecureTokenServiceInvalidates theSecureTokenfor the givenKey- Specified by:
invalidatein interfaceSecureTokenService- Parameters:
key-
-
restoreState
public void restoreState()Restore tokens on server restart.- Specified by:
restoreStatein interfaceSecureTokenService- Since:
- 5.10
-