Class TokenOperationFactoryImpl

  • All Implemented Interfaces:
    TokenOperationFactory

    public class TokenOperationFactoryImpl
    extends Object
    implements TokenOperationFactory
    A Factory class which provides all of the lower-level Token{Validator|Provider|Renewer|Canceller} classes which are plugged-into the top-level operation classes corresponding to the fundamental operations defined in WS-Trust.
    • Method Detail

      • getTokenValidator

        public org.apache.cxf.sts.token.validator.TokenValidator getTokenValidator​(TokenType validatedTokenType,
                                                                                   ValidationInvocationContext validationInvocationContext,
                                                                                   boolean invalidateAMSession)
                                                                            throws STSInitializationException
        Returns a TokenValidator instance that can validate the status of the specified TokenType. This method will be consumed to obtain the TokenValidators necessary to enforce SecurityPolicy bindings, and delegated token relationships.
        Specified by:
        getTokenValidator in interface TokenOperationFactory
        Parameters:
        validatedTokenType - The type of token to be validated
        validationInvocationContext - the context of this validation (SecurityPolicy binding enforcement, delegated token context).
        invalidateAMSession - whether the OpenAM session resulting from successful token validation should be invalidated at the completion of the operation
        Returns:
        The TokenValidation implementation which can validate the specified TokenType
        Throws:
        STSInitializationException - if the TokenValidator cannot be instantiated
      • getSimpleTokenValidator

        public org.apache.cxf.sts.token.validator.TokenValidator getSimpleTokenValidator​(TokenType validatedTokenType)
                                                                                  throws STSInitializationException
        Description copied from interface: TokenOperationFactory
        Returns a TokenValidator which will validate tokens issued by the STS. Note that in the 13 release, this will only involve checking whether the token has been persisted in the CTS. It will not involve the consumption of an authN module. Only TokenValidators will be created for the TokenTypes corresponding to STS-issued tokens - i.e. OIDC and SAML2 tokens.
        Specified by:
        getSimpleTokenValidator in interface TokenOperationFactory
        Parameters:
        validatedTokenType - the type of token to be validated.
        Returns:
        a TokenValidator implementation which simply consults the TokenService to determine whether the token has been persisted in the CTS.
        Throws:
        STSInitializationException - if the TokenValidator cannot be created.
      • getTokenCanceller

        public org.apache.cxf.sts.token.canceller.TokenCanceller getTokenCanceller​(TokenType cancelledTokenType)
                                                                            throws STSInitializationException
        Description copied from interface: TokenOperationFactory
        Returns a TokenCanceller instance which will cancel an STS-issued token. This will simply involve invoking the TokenService to remove the token from the CTS. Only TokenCancellers will be created for the TokenTypes corresponding to STS-issued tokens - i.e. OIDC and SAML2 tokens.
        Specified by:
        getTokenCanceller in interface TokenOperationFactory
        Parameters:
        cancelledTokenType - the type of to-be-cancelled token
        Returns:
        A TokenCanceller instance which can handle the cancellation of the specified TokenType
        Throws:
        STSInitializationException - if the TokenCanceller cannot be created