Package com.atlassian.bamboo.security
Class SecureTokenServiceImpl
- java.lang.Object
-
- com.atlassian.bamboo.security.SecureTokenServiceImpl
-
- All Implemented Interfaces:
SecureTokenService
public class SecureTokenServiceImpl extends Object implements SecureTokenService
-
-
Field Summary
-
Fields inherited from interface com.atlassian.bamboo.security.SecureTokenService
BEAN_NAME
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
SecureTokenServiceImpl(FeatureManager featureManager, XStreamObjectPersister persister)
SecureTokenServiceImpl(XStreamFactory xStreamFactory, FeatureManager featureManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull SecureToken
generate(@NotNull Key key)
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
restoreState()
Restore tokens on server restart.
-
-
-
Constructor Detail
-
SecureTokenServiceImpl
@TestOnly protected SecureTokenServiceImpl(FeatureManager featureManager, XStreamObjectPersister persister)
-
SecureTokenServiceImpl
public SecureTokenServiceImpl(XStreamFactory xStreamFactory, FeatureManager featureManager)
-
-
Method Detail
-
generate
@NotNull public @NotNull SecureToken generate(@NotNull @NotNull Key key)
Description copied from interface:SecureTokenService
Generates aSecureToken
for a givenKey
- Specified by:
generate
in interfaceSecureTokenService
- Returns:
- secureToken
-
isValid
public boolean isValid(@NotNull @NotNull SecureToken tokenToValidate)
Description copied from interface:SecureTokenService
Checks if the givenSecureToken
is valid- Specified by:
isValid
in interfaceSecureTokenService
- Returns:
- valid
-
isValid
public boolean isValid(@NotNull @NotNull SecureToken tokenToValidate, @NotNull @NotNull Key key)
Description copied from interface:SecureTokenService
Checks if the givenSecureToken
is valid for givenKey
- Specified by:
isValid
in interfaceSecureTokenService
- Returns:
- valid
-
invalidate
public void invalidate(@NotNull @NotNull Key key)
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
-
-