private String resolveSelfEntityID(final RoleDescriptor peerRoleDescriptor)
        throws MessageDecodingException {

        val criteria = new CriteriaSet(new RoleDescriptorCriterion(peerRoleDescriptor));
        try {
            val selfEntityID = getSelfEntityIDResolver().resolveSingle(criteria);
            if (selfEntityID == null) {
                throw new MessageDecodingException("Unable to resolve self entityID from peer RoleDescriptor");
            } else {
                return selfEntityID;
            }
        } catch (final ResolverException e) {
            throw new MessageDecodingException("Fatal error resolving self entityID from peer RoleDescriptor", e);
        }
    }
Resolve the self entityID, used as the issuer of the protocol message by this entity.

@param peerRoleDescriptor the peer RoleDescriptor
@return the resolved self entityID
@throws MessageDecodingException if there was a fatal error during resolution,
                                 or the entityID could not be resolved
pac4j-saml/src/main/java/org/pac4j/saml/transport/Pac4jHTTPArtifactDecoder.java