Class SecurityTokenFactory


  • public class SecurityTokenFactory
    extends Object
    This class SecurityTokenFactory represents a factory class to create WS-Security tokens. This class uses pluggable TokenProviders to generate the WS-Security tokens. If the TokenProvider is not specified, this class will use the default implementation of the Token Provider.
    • Constructor Detail

      • SecurityTokenFactory

        protected SecurityTokenFactory​(TokenProvider provider)
        Protected constructor.
    • Method Detail

      • getInstance

        public static SecurityTokenFactory getInstance​(SSOToken credential)
                                                throws SecurityException
        Returns the Security Token factory instance. The default TokenProvider is used to generate the WS-Security tokens.
        Parameters:
        credential - The credential of the authenticated subject.
        Throws:
        SecurityException - if unable to create the the security token factory.
      • getSecurityToken

        public SecurityToken getSecurityToken​(SecurityTokenSpec tokenSpec)
                                       throws SecurityException
        Returns / Creates a security token from the security token specificaion.
        Parameters:
        tokenSpec - Security Token Specification that is needed to generate the security tokens.
        Returns:
        SecurityToken the security token.
        Throws:
        SecurityException - if the security token could not be generated.
      • getTokenProvider

        public TokenProvider getTokenProvider()
        Returns the provider of this Security Token factory object.
        Returns:
        the token provider.