code: public static String getIssuerFromSamlObject(final SAMLObject object) {
          if (object instanceof RequestAbstractType) {
              return RequestAbstractType.class.cast(object).getIssuer().getValue();
          }
          if (object instanceof StatusResponseType) {
              return StatusResponseType.class.cast(object).getIssuer().getValue();
          }
          return null;
      }
docs: Gets issuer from saml object.
  
  @param object the object
  @return the issuer from saml object