public static Map<String,Set<String>> convertToAttributes(NameIDInfo info,NameIDInfoKey infoKey) throws SAML2Exception {
  Map<String,Set<String>> ret=new HashMap<>();
  if (infoKey == null) {
    infoKey=new NameIDInfoKey(info.getNameIDValue(),info.getHostEntityID(),info.getRemoteEntityID());
  }
  ret.put(getNameIDInfoAttribute(),Collections.singleton(info.toValueString()));
  ret.put(getNameIDInfoKeyAttribute(),Collections.singleton(infoKey.toValueString()));
  return ret;
}

public static Map < String , Set < String > > convertToAttributes ( NameIDInfo info , NameIDInfoKey infoKey ) throws SAML2Exception { Map < String , Set < String > > ret = new HashMap < > ( ) ; if ( infoKey == null ) { infoKey = new NameIDInfoKey ( info . getNameIDValue ( ) , info . getHostEntityID ( ) , info . getRemoteEntityID ( ) ) ; } ret . put ( getNameIDInfoAttribute ( ) , Collections . singleton ( info . toValueString ( ) ) ) ; ret . put ( getNameIDInfoKeyAttribute ( ) , Collections . singleton ( infoKey . toValueString ( ) ) ) ; return ret ; }
converts the provided nameidinfo and nameidinfokey to a map & lt ; string , set & lt ; string & gt ; & gt ; structure .
