Class AuthenticationTokenPolicy.SAMLAssertionBinding

    • Constructor Detail

      • SAMLAssertionBinding

        public SAMLAssertionBinding()
        Default constructor
      • SAMLAssertionBinding

        public SAMLAssertionBinding​(String type,
                                    String keyIdentifier,
                                    String authorityIdentifier,
                                    String referenceType)
        Constructor
        Parameters:
        type - the SubjectConfirmation type of the SAML assertion, one of SV, HOK
        keyIdentifier - an abstract identifier for the Confirmation Key
        authorityIdentifier - an abstract identifier for the issuing authority
        referenceType - the reference type for references to the SAML Assertion, should be one of KeyIdentifier, Embedded reference type as defined by WSS SAML Token profile 1.0.
    • Method Detail

      • setAssertionType

        public void setAssertionType​(String type)
        set the SubjectConfirmation type of the SAML assertion
        Parameters:
        type - the SubjectConfirmation type of the SAML assertion, one of SV, HOK
      • setSAMLVersion

        public void setSAMLVersion​(String ver)
      • getSAMLVersion

        public String getSAMLVersion()
      • newPrivateKeyBinding

        public MLSPolicy newPrivateKeyBinding()
        Create and set the KeyBinding for this WSSPolicy to a PrivateKeyBinding
        Returns:
        a new PrivateKeyBinding as a KeyBinding for this WSSPolicy
      • setKeyIdentifier

        public void setKeyIdentifier​(String ki)
        set the abstract identifier for the Confirmation Key
        Parameters:
        ki - the abstract identifier for the Confirmation Key
      • setAuthorityIdentifier

        public void setAuthorityIdentifier​(String uri)
        set the abstract identifier for the issuing authority
        Parameters:
        uri - the URI of the Assertion Issuer
      • setReferenceType

        public void setReferenceType​(String rtype)
        set the ReferenceType to be used for references to the SAML Assertion
        Parameters:
        rtype - reference type (one of KeyIdentifier, Embedded)
      • setAuthorityBinding

        public void setAuthorityBinding​(Element authorityBinding)
        set the SAML AuthorityBinding element, identifying a remote assertion
        Parameters:
        authorityBinding -
      • setAssertion

        public void setAssertion​(Element assertion)
        set the SAML Assertion
        Parameters:
        assertion - the SAML Assertion
      • setKeyAlgorithm

        public void setKeyAlgorithm​(String algorithm)
        set the keyAlgorithm to be used
        Parameters:
        algorithm - the keyAlgorithm to be used
      • getKeyAlgorithm

        public String getKeyAlgorithm()
        Returns:
        key algorithm
      • getReferenceType

        public String getReferenceType()
        Returns:
        reference type
      • getAssertionType

        public String getAssertionType()
        Returns:
        type of SAMLAssertion (SV/HOK)
      • getKeyIdentifier

        public String getKeyIdentifier()
        Returns:
        identifier to key bound to the Assertion
      • getAuthorityIdentifier

        public String getAuthorityIdentifier()
        Returns:
        identifier to Authority issueing the Assertion
      • getAuthorityBinding

        public Element getAuthorityBinding()
        Returns:
        authority binding component of the assertion
      • getAssertion

        public Element getAssertion()
        Returns:
        SAML assertion
      • getType

        public String getType()
        Description copied from interface: SecurityPolicy
        Get the type of the policy.

        Implementation Note: Useful to avoid instanceof checks and String.equals checks

        Specified by:
        getType in interface SecurityPolicy
        Returns:
        the type of the policy
      • setSTRID

        public void setSTRID​(String id)
      • setAssertionId

        public void setAssertionId​(String id)
        set the AssertionId for the possibly remote assertion A CallbackHandler can choose to just set the AuthorityBinding and the AssertionId, and not set the actual assertion
        Parameters:
        id - the Assertion Id of the possibly remote SAML Assertion
      • getAssertionId

        public String getAssertionId()
        A CallbackHandler can choose to just set the AuthorityBinding and the AssertionId, and not set the actual assertion
        Returns:
        the Assertion ID of the SAML Assertion represented by this Policy
      • get_assertion

        public Element get_assertion()