<div dir="ltr"><div><div><div><div>Hi <br><br></div>Are you getting this error when you are firing a request to KC server from your app?<br><br>```<br><pre class="">17:01:31,549 ERROR [org.jboss.resteasy.resteasy_jaxrs.i18n] (default task-1) RESTEASY002010: Failed to execute: javax.ws.rs.NotFoundException: HTTP 404 Not Found</pre>```<br><br></div>I&#39;m not 100% sure (didn&#39;t have time to test) but I think the problem is, KC 1.9.1 are using different endpoints and the iOS app was not updated yet. <br><br>Our cookbook backend[1] was updated to 1.9.1 by the community[2] weeks ago<br><br></div>Unfortunately he updated only the Android app[3] to the new endpoints<br><br></div>Can you check the Android PR[3] and see if you change that in the iOS app it works?<br><div><div><br>[1] <a href="https://github.com/aerogear/aerogear-backend-cookbook/tree/master/Shoot">https://github.com/aerogear/aerogear-backend-cookbook/tree/master/Shoot</a><br>[2] <a href="https://github.com/aerogear/aerogear-backend-cookbook/pull/29">https://github.com/aerogear/aerogear-backend-cookbook/pull/29</a><br>[3] <a href="https://github.com/aerogear/aerogear-android-cookbook/pull/56">https://github.com/aerogear/aerogear-android-cookbook/pull/56</a><br><br><br><br><br><div><br><br></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 28, 2016 at 8:44 AM, Ashish Pandita <span dir="ltr">&lt;<a href="mailto:Ashish.Pandita@indegene.com" target="_blank">Ashish.Pandita@indegene.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<div style="word-wrap:break-word">
<div>Hi All, </div>
<div><br>
</div>
<div>I am having some trouble using aerogear to connect keycloak locally. I am using shoot example I did the following things </div>
<div>1) installed pods on shoot&amp;share <a href="https://github.com/aerogear/aerogear-ios-cookbook/tree/0.3.0/Shoot" target="_blank">https://github.com/aerogear/aerogear-ios-cookbook/tree/0.3.0/Shoot</a></div>
<div>2) installed the key cloak ver keycloak-1.9.2.Final (<a href="https://github.com/aerogear/aerogear-backend-cookbook/tree/master/Shoot" target="_blank">https://github.com/aerogear/aerogear-backend-cookbook/tree/master/Shoot</a>) I can access the admin
 console in browser imported the realm configuration <a href="https://github.com/aerogear/aerogear-backend-cookbook/blob/master/Shoot/configuration/shoot-realm.json" target="_blank">https://github.com/aerogear/aerogear-backend-cookbook/blob/master/Shoot/configuration/shoot-realm.json</a></div>
<div>3) I run the server attached is the log and here is the terminal rec <a href="https://asciinema.org/a/7xhosmb63kn9tnvn99gnh5mbm" target="_blank">https://asciinema.org/a/7xhosmb63kn9tnvn99gnh5mbm</a></div>
<div>4) I am not able to login to keycloak. I am getting errors in console when keycloak launches the web view can you please help what need to be done to resolve it or guide to proper resource. </div>
<div><br>
</div>
<div>here is the Aerogear API which I am using</div>
<div><br>
</div>
<div>
<div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo">
 <span style="color:#bb2ca2">@IBAction</span>
<span style="color:#bb2ca2">
func</span> shareWithKeycloak() {</div>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;min-height:13px">
       <br>
</p>
<div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo">
        <span style="color:#bb2ca2">
let</span> keycloakHost = <span style="color:#d12f1b">
&quot;<a href="http://localhost:8080" target="_blank">http://localhost:8080</a>&quot;</span></div>
<div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo">
        <span style="color:#bb2ca2">
let</span> keycloakConfig = <span style="color:#4f8187">
KeycloakConfig</span>(</div>
<div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo">
            clientId: <span style="color:#d12f1b">
&quot;shoot-third-party&quot;</span>,</div>
<div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo">
            host: keycloakHost,</div>
<div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo">
            realm: <span style="color:#d12f1b">
&quot;shoot-realm&quot;</span>)</div>
<div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,132,0)">
<span style="color:#000000">       
</span>// If you want to use embedded web view uncomment</div>
<div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo">
          keycloakConfig.<span style="color:#4f8187">isWebView</span> =
<span style="color:#bb2ca2">
true</span></div>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;min-height:13px">
        <br>
</p>
<div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(19,55,255)">
<span style="color:#000000">       
</span><span style="color:#008400">// Workaround issue on Keychain
<a href="https://forums.developer.apple.com/message/23323" target="_blank"><span style="color:#1337ff">https://forums.developer.apple.com/message/23323</span></a></span></div>
<div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo">
        <span style="color:#bb2ca2">
let</span> gdModule = <span style="color:#4f8187">
KeycloakOAuth2Module</span>(config: keycloakConfig, session: <span style="color:#4f8187">
UntrustedMemoryOAuth2Session</span>(accountId: <span style="color:#d12f1b">
&quot;ACCOUNT_FOR_CLIENTID_</span>\<span style="color:#d12f1b">(</span>keycloakConfig.<span style="color:#4f8187">clientId</span><span style="color:#d12f1b">)&quot;</span>))</div>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;min-height:13px">
        <br>
</p>
<div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,132,0)">
<span style="color:#000000">       
</span>// let gdModule = AccountManager.addKeycloakAccount(keycloakConfig)</div>
<div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo">
        <span style="color:#bb2ca2">
self</span>.<span style="color:#4f8187">http</span>.<span style="color:#4f8187">authzModule</span> = gdModule</div>
<div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,132,0)">
<span style="color:#000000">      
</span>/* gdModule.login { (response, token, error) in</div>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,132,0);min-height:13px">
            <br>
</p>
<div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,132,0)">
            print(response)</div>
<div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,132,0)">
            print(token)</div>
<div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,132,0)">
            print(error)</div>
<div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,132,0)">
        } */</div>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;min-height:13px">
    <br>
</p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;min-height:13px">
        <br>
</p>
<div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(209,47,27)">
<span style="color:#000000">        
</span><span style="color:#3d1d81">print</span><span style="color:#000000">(</span>&quot;Perform photo upload with Keycloak&quot;<span style="color:#000000">)</span></div>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;min-height:13px">
        <br>
</p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;min-height:13px">
    <br>
</p>
<div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(49,89,93)">
<span style="color:#000000">      
</span><span style="color:#bb2ca2">self</span><span style="color:#000000">.</span>performUpload<span style="color:#000000">(</span><span style="color:#d12f1b">&quot;</span><span style="color:#000000">\</span><span style="color:#d12f1b">(</span><span style="color:#000000">keycloakHost</span><span style="color:#d12f1b">)/shoot/rest/photos&quot;</span><span style="color:#000000">,
 parameters: </span><span style="color:#bb2ca2">self</span><span style="color:#000000">.</span>extractImageAsMultipartParams<span style="color:#000000">())</span></div>
<div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;min-height:13px">
<br>
</div>
<div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo">
    }</div>
<div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;min-height:13px">
<br>
</div>
<div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo">
    <span style="color:#bb2ca2">
func</span> performUpload(url: <span style="color:#703daa">
String</span>, parameters: [<span style="color:#703daa">String</span>:
<span style="color:#703daa">
AnyObject</span>]?) {</div>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;min-height:13px">
        <br>
</p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;min-height:13px">
        <br>
</p>
<div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo">
        <span style="color:#bb2ca2">
self</span>.<span style="color:#4f8187">http</span>.<span style="color:#31595d">request</span>(<span style="color:#4f8187">HttpMethod</span>.<span style="color:#31595d">POST</span>,
 path: url, parameters: parameters, credential: <span style="color:#bb2ca2">
nil</span>, responseSerializer: <span style="color:#bb2ca2">
nil</span>) { (response, error) <span style="color:#bb2ca2">
in</span></div>
<div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo">
            <span style="color:#bb2ca2">
if</span> (error != <span style="color:#bb2ca2">
nil</span>) {</div>
<div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo">
                <span style="color:#bb2ca2">
self</span>.<span style="color:#31595d">presentAlert</span>(<span style="color:#d12f1b">&quot;Error&quot;</span>, message: error!.<span style="color:#703daa">localizedDescription</span>)</div>
<div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo">
            } <span style="color:#bb2ca2">
else</span> {</div>
<div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(209,47,27)">
<span style="color:#000000">               
</span><span style="color:#bb2ca2">self</span><span style="color:#000000">.</span><span style="color:#31595d">presentAlert</span><span style="color:#000000">(</span>&quot;Success&quot;<span style="color:#000000">,
 message: </span>&quot;Successfully uploaded!&quot;<span style="color:#000000">)</span></div>
<div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo">
            }</div>
<div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo">
        }</div>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;min-height:13px">
        <br>
</p>
<div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo">
        <span style="color:#008400">
/*</span></div>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,132,0);min-height:13px">
        <br>
</p>
<div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,132,0)">
        self.http.POST(url, parameters: parameters, completionHandler: {(response, error) in</div>
<div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,132,0)">
            if (error != nil) {</div>
<div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,132,0)">
                self.presentAlert(&quot;Error&quot;, message: error!.localizedDescription)</div>
<div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,132,0)">
            } else {</div>
<div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,132,0)">
                self.presentAlert(&quot;Success&quot;, message: &quot;Successfully uploaded!&quot;)</div>
<div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,132,0)">
            }</div>
<div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,132,0)">
        })</div>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,132,0);min-height:13px">
 <br>
</p>
<div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,132,0)">
            */</div>
<div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo">
    }</div>
</div>
<div><br>
</div>
<div><br>
</div>
<br>
<div></div>
Disclaimer : This message and any attachments are solely for the intended recipient and may contain confidential or privileged information. If you are not the intended recipient, any disclosure, copying, use, or distribution of the information included in this
 message and any attachments is prohibited. If you have received this communication in error, please notify us by reply e-mail to IT@Indegene.com and immediately and permanently delete this message and any attachments. Any views expressed in this mail are not
 necessarily the views of INDEGENE. Thank you.
</div>

<br>_______________________________________________<br>
Aerogear-users mailing list<br>
<a href="mailto:Aerogear-users@lists.jboss.org">Aerogear-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-users" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-users</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr">-- Passos<br></div></div>
</div>