Class AbstractOperation

java.lang.Object
org.apache.cxf.sts.operation.AbstractOperation
Direct Known Subclasses:
TokenCancelOperation, TokenIssueOperation, TokenRenewOperation, TokenRequestCollectionOperation, TokenValidateOperation

public abstract class AbstractOperation extends Object
This abstract class contains some common functionality for different operations.
  • Field Details

    • TOKEN_TYPE

      public static final QName TOKEN_TYPE
    • stsProperties

      protected STSPropertiesMBean stsProperties
    • encryptIssuedToken

      protected boolean encryptIssuedToken
    • services

      protected List<ServiceMBean> services
    • tokenProviders

      protected List<TokenProvider> tokenProviders
    • tokenValidators

      protected List<TokenValidator> tokenValidators
    • returnReferences

      protected boolean returnReferences
    • tokenStore

      protected TokenStore tokenStore
    • claimsManager

      protected ClaimsManager claimsManager
    • eventPublisher

      protected STSEventListener eventPublisher
    • delegationHandlers

      protected List<TokenDelegationHandler> delegationHandlers
    • tokenWrapper

      protected TokenWrapper tokenWrapper
    • allowCustomContent

      protected boolean allowCustomContent
    • includeLifetimeElement

      protected boolean includeLifetimeElement
  • Constructor Details

    • AbstractOperation

      public AbstractOperation()
  • Method Details

    • isAllowCustomContent

      public boolean isAllowCustomContent()
    • setAllowCustomContent

      public void setAllowCustomContent(boolean allowCustomContent)
    • getTokenWrapper

      public TokenWrapper getTokenWrapper()
    • setTokenWrapper

      public void setTokenWrapper(TokenWrapper tokenWrapper)
    • isReturnReferences

      public boolean isReturnReferences()
    • setReturnReferences

      public void setReturnReferences(boolean returnReferences)
    • getTokenStore

      public TokenStore getTokenStore()
    • setTokenStore

      public void setTokenStore(TokenStore tokenStore)
    • setStsProperties

      public void setStsProperties(STSPropertiesMBean stsProperties)
    • setEncryptIssuedToken

      public void setEncryptIssuedToken(boolean encryptIssuedToken)
    • setServices

      public void setServices(List<ServiceMBean> services)
    • setTokenProviders

      public void setTokenProviders(List<TokenProvider> tokenProviders)
    • getDelegationHandlers

      public List<TokenDelegationHandler> getDelegationHandlers()
    • setDelegationHandlers

      public void setDelegationHandlers(List<TokenDelegationHandler> delegationHandlers)
    • getTokenProviders

      public List<TokenProvider> getTokenProviders()
    • setTokenValidators

      public void setTokenValidators(List<TokenValidator> tokenValidators)
    • getTokenValidators

      public List<TokenValidator> getTokenValidators()
    • getClaimsManager

      public ClaimsManager getClaimsManager()
    • setClaimsManager

      public void setClaimsManager(ClaimsManager claimsManager)
    • setIncludeLifetimeElement

      public void setIncludeLifetimeElement(boolean value)
    • isIncludeLifetimeElement

      public boolean isIncludeLifetimeElement()
    • parseRequest

      protected RequestRequirements parseRequest(RequestSecurityTokenType request, Map<String,Object> messageContext)
      Check the arguments from the STSProvider and parse the request.
    • cleanRequest

      protected void cleanRequest(RequestRequirements requestRequirements)
    • createRequestedReference

      protected static RequestedReferenceType createRequestedReference(TokenReference tokenReference, boolean attached)
      Create a RequestedReferenceType object using a TokenReference object
    • createRequestedReference

      protected static RequestedReferenceType createRequestedReference(String tokenId, String tokenType, boolean attached)
      Create a RequestedReferenceType object using a token id and tokenType
    • createLifetime

      protected static LifetimeType createLifetime(Instant tokenCreated, Instant tokenExpires)
      Create a LifetimeType object given a created + expires Dates
    • encryptSecret

      protected Element encryptSecret(byte[] secret, EncryptionProperties encryptionProperties, KeyRequirements keyRequirements) throws org.apache.wss4j.common.ext.WSSecurityException
      Encrypt a secret using the given arguments producing a DOM EncryptedKey element
      Throws:
      org.apache.wss4j.common.ext.WSSecurityException
    • extractAddressFromAppliesTo

      protected String extractAddressFromAppliesTo(Element appliesTo)
      Extract an address from an AppliesTo DOM element
    • createTokenProviderParameters

      protected TokenProviderParameters createTokenProviderParameters(RequestRequirements requestRequirements, Principal principal, Map<String,Object> messageContext)
      Create a TokenProviderParameters object
    • validateReceivedToken

      protected TokenValidatorResponse validateReceivedToken(Principal principal, Map<String,Object> messageContext, String realm, TokenRequirements tokenRequirements, ReceivedToken token)
    • performDelegationHandling

      protected void performDelegationHandling(RequestRequirements requestRequirements, Principal principal, Map<String,Object> messageContext, ReceivedToken token, Principal tokenPrincipal, Set<Principal> tokenRoles)
    • processValidToken

      protected void processValidToken(TokenProviderParameters providerParameters, ReceivedToken validatedToken, TokenValidatorResponse tokenResponse)
    • setEventListener

      public void setEventListener(STSEventListener eventListener)
    • publishEvent

      protected void publishEvent(AbstractSTSEvent event)
    • findInboundSecurityToken

      protected static org.apache.xml.security.stax.securityToken.SecurityToken findInboundSecurityToken(org.apache.xml.security.stax.securityEvent.SecurityEventConstants.Event event, Map<String,Object> messageContext) throws org.apache.xml.security.exceptions.XMLSecurityException
      Throws:
      org.apache.xml.security.exceptions.XMLSecurityException