<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<div class="">Hi All,&nbsp;</div>
<div class=""><br class="">
</div>
<div class="">I am having some trouble using aerogear to connect keycloak locally. I am using shoot example I did the following things&nbsp;</div>
<div class="">1) installed pods on shoot&amp;share&nbsp;<a href="https://github.com/aerogear/aerogear-ios-cookbook/tree/0.3.0/Shoot" class="">https://github.com/aerogear/aerogear-ios-cookbook/tree/0.3.0/Shoot</a></div>
<div class="">2) installed the key cloak ver&nbsp;keycloak-1.9.2.Final (<a href="https://github.com/aerogear/aerogear-backend-cookbook/tree/master/Shoot" class="">https://github.com/aerogear/aerogear-backend-cookbook/tree/master/Shoot</a>) I can access the admin
 console in browser imported the realm configuration&nbsp;<a href="https://github.com/aerogear/aerogear-backend-cookbook/blob/master/Shoot/configuration/shoot-realm.json" class="">https://github.com/aerogear/aerogear-backend-cookbook/blob/master/Shoot/configuration/shoot-realm.json</a></div>
<div class="">3) I run the server attached is the log and here is the terminal rec&nbsp;<a href="https://asciinema.org/a/7xhosmb63kn9tnvn99gnh5mbm" class="">https://asciinema.org/a/7xhosmb63kn9tnvn99gnh5mbm</a></div>
<div class="">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.&nbsp;</div>
<div class=""><br class="">
</div>
<div class="">here is the Aerogear API which I am using</div>
<div class=""><br class="">
</div>
<div class="">
<div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">
&nbsp;<span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">@IBAction</span>
<span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">
func</span> shareWithKeycloak() {</div>
<p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; min-height: 13px;" class="">
&nbsp; &nbsp; &nbsp; &nbsp;<br class="webkit-block-placeholder">
</p>
<div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">
&nbsp; &nbsp; &nbsp; &nbsp; <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">
let</span> keycloakHost = <span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">
&quot;<a href="http://localhost:8080" class="">http://localhost:8080</a>&quot;</span></div>
<div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">
&nbsp; &nbsp; &nbsp; &nbsp; <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">
let</span> keycloakConfig = <span style="font-variant-ligatures: no-common-ligatures; color: #4f8187" class="">
KeycloakConfig</span>(</div>
<div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; clientId: <span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">
&quot;shoot-third-party&quot;</span>,</div>
<div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; host: keycloakHost,</div>
<div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; realm: <span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">
&quot;shoot-realm&quot;</span>)</div>
<div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 132, 0);" class="">
<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">&nbsp; &nbsp; &nbsp; &nbsp;
</span>// If you want to use embedded web view uncomment</div>
<div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; keycloakConfig.<span style="font-variant-ligatures: no-common-ligatures; color: #4f8187" class="">isWebView</span> =
<span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">
true</span></div>
<p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; min-height: 13px;" class="">
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<br class="webkit-block-placeholder">
</p>
<div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(19, 55, 255);" class="">
<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">&nbsp; &nbsp; &nbsp; &nbsp;
</span><span style="font-variant-ligatures: no-common-ligatures; color: #008400" class="">// Workaround issue on Keychain
<a href="https://forums.developer.apple.com/message/23323" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #1337ff" class="">https://forums.developer.apple.com/message/23323</span></a></span></div>
<div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">
&nbsp; &nbsp; &nbsp; &nbsp; <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">
let</span> gdModule = <span style="font-variant-ligatures: no-common-ligatures; color: #4f8187" class="">
KeycloakOAuth2Module</span>(config: keycloakConfig, session: <span style="font-variant-ligatures: no-common-ligatures; color: #4f8187" class="">
UntrustedMemoryOAuth2Session</span>(accountId: <span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">
&quot;ACCOUNT_FOR_CLIENTID_</span>\<span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">(</span>keycloakConfig.<span style="font-variant-ligatures: no-common-ligatures; color: #4f8187" class="">clientId</span><span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">)&quot;</span>))</div>
<p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; min-height: 13px;" class="">
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<br class="webkit-block-placeholder">
</p>
<div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 132, 0);" class="">
<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">&nbsp; &nbsp; &nbsp; &nbsp;
</span>// let gdModule = AccountManager.addKeycloakAccount(keycloakConfig)</div>
<div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">
&nbsp; &nbsp; &nbsp; &nbsp; <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">
self</span>.<span style="font-variant-ligatures: no-common-ligatures; color: #4f8187" class="">http</span>.<span style="font-variant-ligatures: no-common-ligatures; color: #4f8187" class="">authzModule</span> = gdModule</div>
<div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 132, 0);" class="">
<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">&nbsp;&nbsp; &nbsp; &nbsp;
</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;" class="">
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br class="webkit-block-placeholder">
</p>
<div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 132, 0);" class="">
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print(response)</div>
<div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 132, 0);" class="">
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print(token)</div>
<div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 132, 0);" class="">
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print(error)</div>
<div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 132, 0);" class="">
&nbsp; &nbsp; &nbsp; &nbsp; } */</div>
<p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; min-height: 13px;" class="">
&nbsp;&nbsp; &nbsp;<br class="webkit-block-placeholder">
</p>
<p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; min-height: 13px;" class="">
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<br class="webkit-block-placeholder">
</p>
<div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(209, 47, 27);" class="">
<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;
</span><span style="font-variant-ligatures: no-common-ligatures; color: #3d1d81" class="">print</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">(</span>&quot;Perform photo upload with Keycloak&quot;<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">)</span></div>
<p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; min-height: 13px;" class="">
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<br class="webkit-block-placeholder">
</p>
<p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; min-height: 13px;" class="">
&nbsp;&nbsp; &nbsp;<br class="webkit-block-placeholder">
</p>
<div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(49, 89, 93);" class="">
<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">&nbsp;&nbsp; &nbsp; &nbsp;
</span><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">self</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">.</span>performUpload<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">(</span><span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">&quot;</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">\</span><span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">(</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">keycloakHost</span><span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">)/shoot/rest/photos&quot;</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">,
 parameters: </span><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">self</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">.</span>extractImageAsMultipartParams<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">())</span></div>
<div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; min-height: 13px;" class="">
<br class="">
</div>
<div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">
&nbsp; &nbsp; }</div>
<div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; min-height: 13px;" class="">
<br class="">
</div>
<div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">
&nbsp; &nbsp; <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">
func</span> performUpload(url: <span style="font-variant-ligatures: no-common-ligatures; color: #703daa" class="">
String</span>, parameters: [<span style="font-variant-ligatures: no-common-ligatures; color: #703daa" class="">String</span>:
<span style="font-variant-ligatures: no-common-ligatures; color: #703daa" class="">
AnyObject</span>]?) {</div>
<p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; min-height: 13px;" class="">
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<br class="webkit-block-placeholder">
</p>
<p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; min-height: 13px;" class="">
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<br class="webkit-block-placeholder">
</p>
<div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">
&nbsp; &nbsp; &nbsp; &nbsp; <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">
self</span>.<span style="font-variant-ligatures: no-common-ligatures; color: #4f8187" class="">http</span>.<span style="font-variant-ligatures: no-common-ligatures; color: #31595d" class="">request</span>(<span style="font-variant-ligatures: no-common-ligatures; color: #4f8187" class="">HttpMethod</span>.<span style="font-variant-ligatures: no-common-ligatures; color: #31595d" class="">POST</span>,
 path: url, parameters: parameters, credential: <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">
nil</span>, responseSerializer: <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">
nil</span>) { (response, error) <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">
in</span></div>
<div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">
if</span> (error != <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">
nil</span>) {</div>
<div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">
self</span>.<span style="font-variant-ligatures: no-common-ligatures; color: #31595d" class="">presentAlert</span>(<span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">&quot;Error&quot;</span>, message: error!.<span style="font-variant-ligatures: no-common-ligatures; color: #703daa" class="">localizedDescription</span>)</div>
<div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">
else</span> {</div>
<div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(209, 47, 27);" class="">
<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</span><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">self</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">.</span><span style="font-variant-ligatures: no-common-ligatures; color: #31595d" class="">presentAlert</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">(</span>&quot;Success&quot;<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">,
 message: </span>&quot;Successfully uploaded!&quot;<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">)</span></div>
<div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div>
<div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">
&nbsp; &nbsp; &nbsp; &nbsp; }</div>
<p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; min-height: 13px;" class="">
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<br class="webkit-block-placeholder">
</p>
<div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">
&nbsp; &nbsp; &nbsp; &nbsp; <span style="font-variant-ligatures: no-common-ligatures; color: #008400" class="">
/*</span></div>
<p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 132, 0); min-height: 13px;" class="">
&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<br class="webkit-block-placeholder">
</p>
<div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 132, 0);" class="">
&nbsp; &nbsp; &nbsp; &nbsp; 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);" class="">
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (error != nil) {</div>
<div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 132, 0);" class="">
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 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);" class="">
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } else {</div>
<div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 132, 0);" class="">
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 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);" class="">
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div>
<div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 132, 0);" class="">
&nbsp; &nbsp; &nbsp; &nbsp; })</div>
<p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 132, 0); min-height: 13px;" class="">
&nbsp;<br class="webkit-block-placeholder">
</p>
<div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 132, 0);" class="">
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; */</div>
<div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">
&nbsp; &nbsp; }</div>
</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<br class="">
<div class=""></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.
</body>
</html>