Interface AttributeAuthorityMapper


  • @SupportedAll
    public interface AttributeAuthorityMapper
    This interface AttributeAuthorityMapper is used by attribute authority to process attribute query. Make sure to use thread-safe code if you implement the AttributeAuthorityMapper. You can use the attributes on the HttpRequest instead of synchronizing them. The default AttributeAuthorityMapper uses an attribute on the HttpServletRequest to pass information to the AttributeQueryUtil.
    • Method Detail

      • authenticateRequester

        void authenticateRequester​(javax.servlet.http.HttpServletRequest request,
                                   javax.servlet.http.HttpServletResponse response,
                                   AttributeQuery attrQuery,
                                   String attrAuthorityEntityID,
                                   String realm)
                            throws SAML2Exception
        Checks if the attribute query requester is valid.
        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

        void validateAttributeQuery​(javax.servlet.http.HttpServletRequest request,
                                    javax.servlet.http.HttpServletResponse response,
                                    AttributeQuery attrQuery,
                                    String attrAuthorityEntityID,
                                    String realm)
                             throws SAML2Exception
        Checks if the attribute query is valid.
        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

        Object getIdentity​(javax.servlet.http.HttpServletRequest request,
                           javax.servlet.http.HttpServletResponse response,
                           AttributeQuery attrQuery,
                           String attrAuthorityEntityID,
                           String realm)
                    throws SAML2Exception
        Returns an identity that matches the subject in the attribute query.
        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

        List getAttributes​(Object identity,
                           AttributeQuery attrQuery,
                           String attrAuthorityEntityID,
                           String realm)
                    throws SAML2Exception
        Returns attributes of the specifed identity.
        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.