Class TokenBuilder

    • Method Detail

      • buildSTR

        protected SecurityTokenReference buildSTR​(String strId,
                                                  Reference ref)
        creates a new SecurityTokenReference with the reference element provided sets the id provided in the SecurityTokenReference if the security policy is a SignaturePolicy
        Parameters:
        strId - String
        ref - Reference
        Returns:
        SecurityTokenReference
      • buildSTR

        protected SecurityTokenReference buildSTR​(Reference ref)
        creates a new SecurityTokenReference with the reference element provided
        Parameters:
        ref - Reference
        Returns:
        SecurityTokenReference
      • buildKeyInfo

        protected KeyInfo buildKeyInfo​(Reference ref,
                                       String strId)
        builds SecurityTokenReference with the reference element provided and with the id. creates key info with this SecurityTokenReference
        Parameters:
        ref - Referenc
        strId - String
        Returns:
        KeyInfo
      • buildKeyInfo

        protected KeyInfo buildKeyInfo​(SecurityTokenReference str)
        creates key info with the SecurityTokenReference provided
        Parameters:
        str - SecurityTokenReference
        Returns:
        KeyInfo
      • buildKeyInfo

        protected KeyInfo buildKeyInfo​(PublicKey pubKey)
        builds key value with the public key provided Uses thid key value to construct key info
        Parameters:
        pubKey - PublicKey
        Returns:
        KeyInfo
      • buildKeyValue

        protected KeyValue buildKeyValue​(PublicKey pubKey)
        builds RSA key value with the public key provided
        Parameters:
        pubKey - PublicKey
        Returns:
        KeyValue
      • buildKIWithKeyName

        protected KeyInfo buildKIWithKeyName​(String name)
      • buildDirectReference

        protected DirectReference buildDirectReference​(String id,
                                                       String valueType)
        builds the direct reference and sets the id and valueType in it
        Parameters:
        id - String
        valueType - String
        Returns:
        DirectReference
      • buildKeyInfoWithEKSHA1

        protected KeyIdentifier buildKeyInfoWithEKSHA1​(String ekSHA1Ref)
        builds keyInfo with the given encrypted key sha1 reference
        Parameters:
        ekSHA1Ref - String
        Returns:
        KeyIdentifier
      • getKeyInfo

        public KeyInfo getKeyInfo()
        Returns:
        javax.xml.crypto.dsig.keyinfo.KeyInfo