Class X509SubjectAttributeAuthorityMapper

  • All Implemented Interfaces:
    AttributeAuthorityMapper

    public class X509SubjectAttributeAuthorityMapper
    extends Object
    implements AttributeAuthorityMapper
    This class X509SubjectAttributeAuthorityMapper is the implementation of the AttributeAuthorityMapper that is used by attribute authority to process attribute query with profile "urn:oasis:names:tc:SAML:2.0:profiles:query:attribute:X509".
    • Constructor Detail

      • X509SubjectAttributeAuthorityMapper

        public X509SubjectAttributeAuthorityMapper()
    • Method Detail

      • authenticateRequester

        public void authenticateRequester​(jakarta.servlet.http.HttpServletRequest request,
                                          jakarta.servlet.http.HttpServletResponse response,
                                          AttributeQuery attrQuery,
                                          String attrAuthorityEntityID,
                                          String realm)
                                   throws SAML2Exception
        Checks if the attribute query requester is valid.
        Specified by:
        authenticateRequester in interface AttributeAuthorityMapper
        Parameters:
        request - HttpServletRequest
        response - HttpServletResponse
        attrQuery - attribute query
        attrAuthorityEntityID - entity ID of attribute authority
        realm - the realm of hosted entity
        Throws:
        SAML2Exception - if the request is not valid.
      • validateAttributeQuery

        public void validateAttributeQuery​(jakarta.servlet.http.HttpServletRequest request,
                                           jakarta.servlet.http.HttpServletResponse response,
                                           AttributeQuery attrQuery,
                                           String attrAuthorityEntityID,
                                           String realm)
                                    throws SAML2Exception
        Checks if the attribute query is valid.
        Specified by:
        validateAttributeQuery in interface AttributeAuthorityMapper
        Parameters:
        request - HttpServletRequest
        response - HttpServletResponse
        attrQuery - attribute query
        attrAuthorityEntityID - entity ID of attribute authority
        realm - the realm of hosted entity
        Throws:
        SAML2Exception - if the attribute query is not valid.
      • getIdentity

        public Object getIdentity​(jakarta.servlet.http.HttpServletRequest request,
                                  jakarta.servlet.http.HttpServletResponse response,
                                  AttributeQuery attrQuery,
                                  String attrAuthorityEntityID,
                                  String realm)
                           throws SAML2Exception
        Returns an identity that matches the subject in the attribute query.
        Specified by:
        getIdentity in interface AttributeAuthorityMapper
        Parameters:
        request - HttpServletRequest
        response - HttpServletResponse
        attrQuery - attribute query
        attrAuthorityEntityID - entity ID of attribute authority
        realm - the realm of hosted entity
        Returns:
        an identity that matches the subject in the attribute query.
        Throws:
        SAML2Exception - if error occurs.
      • getAttributes

        public List getAttributes​(Object identity,
                                  AttributeQuery attrQuery,
                                  String attrAuthorityEntityID,
                                  String realm)
                           throws SAML2Exception
        Returns attributes of the specifed identity.
        Specified by:
        getAttributes in interface AttributeAuthorityMapper
        Parameters:
        identity - the identity
        attrQuery - attribute query
        attrAuthorityEntityID - entity ID of attribute authority
        realm - the realm of hosted entity
        Returns:
        a list of com.sun.identity.saml2.assertion.Attribute.
        Throws:
        SAML2Exception - if error occurs.