private RoleDescriptor resolvePeerRoleDescriptor(final SAML2Artifact artifact)
        throws MessageDecodingException {

        val criteriaSet = new CriteriaSet(
            new ArtifactCriterion(artifact),
            new ProtocolCriterion(SAMLConstants.SAML20P_NS),
            new EntityRoleCriterion(getPeerEntityRole()));
        try {
            val rd = roleDescriptorResolver.resolveSingle(criteriaSet);
            if (rd == null) {
                throw new MessageDecodingException("Unable to resolve peer RoleDescriptor from supplied artifact");
            }
            return rd;
        } catch (final ResolverException e) {
            throw new MessageDecodingException("Error resolving peer entity RoleDescriptor", e);
        }
    }
Resolve the role descriptor of the SAML peer who issued the supplied artifact.

@param artifact the artifact to process
@return the peer RoleDescriptor
@throws MessageDecodingException if there was a fatal error resolving the role descriptor,
                                 or the descriptor could not be resolved
pac4j-saml/src/main/java/org/pac4j/saml/transport/Pac4jHTTPArtifactDecoder.java