Class SAMLSubjectNameIdentifierContext

    • Field Detail

      • log

        @Nullable
        private org.slf4j.Logger log
        Logger.
      • nameID

        @Nullable
        private SAMLObject nameID
        The SAML name identifier represented by this context.
    • Constructor Detail

      • SAMLSubjectNameIdentifierContext

        public SAMLSubjectNameIdentifierContext()
    • Method Detail

      • getSubjectNameIdentifier

        @Nullable
        public SAMLObject getSubjectNameIdentifier()
        Gets the subject name identifier represented by the context, which is guaranteed to be either a SAML 1 NameIdentifier or a SAML 2 NameID.

        The value will be dynamically resolved if the immediate parent context of this context is a MessageContext holding a SAMLObject representing a SAML protocol message, and that protocol message contains a SAML 1 or SAML 2 subject.

        Returns:
        the name identifier instance, may be null
      • getSAML2SubjectNameID

        @Nullable
        public NameID getSAML2SubjectNameID()
        Gets the SAML 2 NameID represented by this context.

        Dynamic resolution is attempted per getSubjectNameIdentifier().

        Returns:
        the name identifier instance or null
      • setSubjectNameIdentifier

        public void setSubjectNameIdentifier​(@Nullable
                                             SAMLObject newNameID)
        Sets the name identifier, which must be either a SAML 1 NameIdentifier or a SAML 2 NameID or null.
        Parameters:
        newNameID - the name identifier instance
      • resolveNameIdentifier

        @Nullable
        protected SAMLObject resolveNameIdentifier()
        Dynamically resolve the name identifier from the SAML protocol message held in MessageContext.getMessage(), if it exists.
        Returns:
        the name identifier, or null if it can not be resolved
      • resolveSAMLMessage

        @Nullable
        protected SAMLObject resolveSAMLMessage()
        Resolve the SAML message from the message context.
        Returns:
        the SAML message, or null if it can not be resolved