<div dir="ltr"><div><div><div>Max,<br><br></div>see <a href="https://github.com/jbossas/jboss-as/pull/4349">https://github.com/jbossas/jboss-as/pull/4349</a><br><br>--<br></div><div>tomaz<br></div></div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Tue, Apr 9, 2013 at 1:01 PM, Max Rydahl Andersen <span dir="ltr"><<a href="mailto:manderse@redhat.com" target="_blank">manderse@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
This is cool - how does the authentication work/not work ?<br>
<br>
Found this on github:<br>
"It requires a patched AS7 instance if not running on the same host.<br>
Some browsers require extra steps to get the authentication working, but Firefox should work out of the box."<br>
<br>
<a href="http://haraldpehl.blogspot.de/2013/03/independent-jboss-admin-console.html" target="_blank">http://haraldpehl.blogspot.de/2013/03/independent-jboss-admin-console.html</a> explains it a bit but<br>
what is the patch needed for AS7 and with all these quirks do you think we can make it portable/usable for<br>
writing a webapp that connects remotely ?<br>
<span class="HOEnZb"><font color="#888888"><br>
/max<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On Tue, Apr 09, 2013 at 08:11:59AM +0200, Heiko Braun wrote:<br>
>Here's a code sample:<br>
><br>
><br>
><script><br>
>// access EC2 demo instance<br>
>http = new XMLHttpRequest();<br>
>http.withCredentials = true;<br>
>http.open("POST", "<a href="http://as7-preview.dyndns.org:9990/management" target="_blank">http://as7-preview.dyndns.org:9990/management</a>", true);<br>
><br>
>// async response handler<br>
>http.onreadystatechange =function()<br>
>{<br>
> if (http.readyState==4 && http.status==200)<br>
> {<br>
> // decode response<br>
> response = dmr.ModelNode.fromBase64(http.responseText);<br>
> alert(response.get("result").asString());<br>
> }<br>
>}<br>
><br>
>// content type headers for DMR API<br>
>http.setRequestHeader("Content-type","application/dmr-encoded");<br>
>http.setRequestHeader("Accept","application/dmr-encoded");<br>
><br>
>// create an operation<br>
>op = new dmr.ModelNode();<br>
>op.get("operation").set("read-attribute");<br>
>op.get("address").setEmptyList();<br>
>op.get("name").set("release-version");<br>
><br>
>// send as base64 encoded<br>
>http.send(op.toBase64String());<br>
><br>
></script><br>
><br>
><br>
>On Apr 8, 2013, at 1:20 PM, Heiko Braun <<a href="mailto:hbraun@redhat.com">hbraun@redhat.com</a>> wrote:<br>
><br>
>><br>
>><br>
>> If you want to use the DMR API form plain JS and need all the typing build in, the dmr.js might be your friend:<br>
>><br>
>> <a href="https://github.com/hal/dmr.js" target="_blank">https://github.com/hal/dmr.js</a><br>
>><br>
>><br>
>> Regards, Heiko<br>
>> _______________________________________________<br>
>> jboss-as7-dev mailing list<br>
>> <a href="mailto:jboss-as7-dev@lists.jboss.org">jboss-as7-dev@lists.jboss.org</a><br>
>> <a href="https://lists.jboss.org/mailman/listinfo/jboss-as7-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/jboss-as7-dev</a><br>
><br>
<br>
>_______________________________________________<br>
>jboss-as7-dev mailing list<br>
><a href="mailto:jboss-as7-dev@lists.jboss.org">jboss-as7-dev@lists.jboss.org</a><br>
><a href="https://lists.jboss.org/mailman/listinfo/jboss-as7-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/jboss-as7-dev</a><br>
<br>
_______________________________________________<br>
jboss-as7-dev mailing list<br>
<a href="mailto:jboss-as7-dev@lists.jboss.org">jboss-as7-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/jboss-as7-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/jboss-as7-dev</a><br>
</div></div></blockquote></div><br></div>