com.atlassian.bamboo.security
Class SecureTokenServiceImpl

java.lang.Object
  extended by com.atlassian.bamboo.security.SecureTokenServiceImpl
All Implemented Interfaces:
SecureTokenService, com.atlassian.event.EventListener

public class SecureTokenServiceImpl
extends java.lang.Object
implements SecureTokenService, com.atlassian.event.EventListener

This implementation responds to BuildFinishedEvent and ChainCompletedEvent by automatically calling invalidate(com.atlassian.bamboo.plan.PlanResultKey)


Field Summary
 
Fields inherited from interface com.atlassian.bamboo.security.SecureTokenService
BEAN_NAME
 
Constructor Summary
SecureTokenServiceImpl()
           
 
Method Summary
 SecureToken generate(PlanResultKey planResultKey)
          Generates a SecureToken for a given PlanResultKey
 java.lang.Class[] getHandledEventClasses()
           
 void handleEvent(com.atlassian.event.Event event)
           
 void invalidate(PlanResultKey planResultKey)
          Invalidates the SecureToken for the given PlanResultKey
 boolean isValid(SecureToken tokenToValidate)
          Checks if the given SecureToken is valid
 boolean isValid(SecureToken tokenToValidate, PlanResultKey planResultKey)
          Checks if the given SecureToken is valid for given PlanResultKey
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SecureTokenServiceImpl

public SecureTokenServiceImpl()
Method Detail

generate

@NotNull
public SecureToken generate(@NotNull
                                    PlanResultKey planResultKey)
Description copied from interface: SecureTokenService
Generates a SecureToken for a given PlanResultKey

Specified by:
generate in interface SecureTokenService
Returns:
secureToken

isValid

public boolean isValid(@NotNull
                       SecureToken tokenToValidate)
Description copied from interface: SecureTokenService
Checks if the given SecureToken is valid

Specified by:
isValid in interface SecureTokenService
Returns:
valid

isValid

public boolean isValid(@NotNull
                       SecureToken tokenToValidate,
                       @NotNull
                       PlanResultKey planResultKey)
Description copied from interface: SecureTokenService
Checks if the given SecureToken is valid for given PlanResultKey

Specified by:
isValid in interface SecureTokenService
Returns:
valid

invalidate

public void invalidate(@NotNull
                       PlanResultKey planResultKey)
Description copied from interface: SecureTokenService
Invalidates the SecureToken for the given PlanResultKey

Specified by:
invalidate in interface SecureTokenService

handleEvent

public void handleEvent(com.atlassian.event.Event event)
Specified by:
handleEvent in interface com.atlassian.event.EventListener

getHandledEventClasses

public java.lang.Class[] getHandledEventClasses()
Specified by:
getHandledEventClasses in interface com.atlassian.event.EventListener


Copyright © 2011 Atlassian. All Rights Reserved.