<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Jun 18, 2013, at 12:33 PM, Matthias Wessendorf &lt;<a href="mailto:matzew@apache.org">matzew@apache.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jun 18, 2013 at 11:26 AM, Christos Vasilakis <span dir="ltr">&lt;<a href="mailto:cvasilak@gmail.com" target="_blank">cvasilak@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; position: static; z-index: auto; "><div style="word-wrap:break-word">Hi team,<div><div><br></div><div>we have decided for our ios 1.1.0 release to go with the approach of setting the NSURLCredential as a config param on the pipe.</div>
</div></div></blockquote><div><br></div><div><br></div><div style="">Not really decided, since&nbsp;decisions&nbsp;are made here, on the public mailing list :-)&nbsp;</div></div></div></div></blockquote><div><br></div><div>+1000 for that wrong expression my bad :(</div><div><br></div><br><blockquote type="cite"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div style="">As mentioned on the meeting notes we talked about it, coming to the conclusion, that for now, it makes more sense using this approach (compared to the AGAuthModule with login/logout/enroll).</div>
<div><br></div><div><br></div><div>&nbsp;</div><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> That is:</div><div><br></div><div>
<pre style="margin-top:0px;margin-bottom:0px;padding:0px;border:0px"><div class="im"><div style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:18px;margin:0px;padding:0px 0px 0px 10px;border:0px">
<span style="margin:0px;padding:0px;border:0px;color:rgb(68,85,136);font-weight:bold">id</span> <span style="margin:0px;padding:0px;border:0px;font-weight:bold">&lt;</span><span style="margin:0px;padding:0px;border:0px">AGPipe</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">&gt;</span> <span style="margin:0px;padding:0px;border:0px">pipe</span> <span style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span style="margin:0px;padding:0px;border:0px">[</span><span style="margin:0px;padding:0px;border:0px">_pipeline</span> <span style="margin:0px;padding:0px;border:0px">pipe</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">:^</span><span style="margin:0px;padding:0px;border:0px">(</span><span style="margin:0px;padding:0px;border:0px;color:rgb(68,85,136);font-weight:bold">id</span> <span style="margin:0px;padding:0px;border:0px;font-weight:bold">&lt;</span><span style="margin:0px;padding:0px;border:0px">AGPipeConfig</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">&gt;</span> <span style="margin:0px;padding:0px;border:0px">config</span><span style="margin:0px;padding:0px;border:0px">)</span> <span style="margin:0px;padding:0px;border:0px">{</span></div>
<div style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:18px;margin:0px;padding:0px 0px 0px 10px;border:0px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="margin:0px;padding:0px;border:0px">[</span><span style="margin:0px;padding:0px;border:0px">config</span> <span style="margin:0px;padding:0px;border:0px">setName</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">:</span><span style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">@"autobots"</span><span style="margin:0px;padding:0px;border:0px">];</span></div>
</div><div style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:18px;margin:0px;padding:0px 0px 0px 10px;border:0px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="margin:0px;padding:0px;border:0px;color:rgb(153,153,136);font-style:italic">// set up credentials for Basic/Digest</span></div>
<div style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:18px;margin:0px;padding:0px 0px 0px 10px;border:0px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="margin:0px;padding:0px;border:0px">[</span><span style="margin:0px;padding:0px;border:0px">config</span> <span style="margin:0px;padding:0px;border:0px">setCredential</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">:</span><span style="margin:0px;padding:0px;border:0px">[</span><span style="margin:0px;padding:0px;border:0px">NSURLCredential</span></div>
<div style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:18px;margin:0px;padding:0px 0px 0px 10px;border:0px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="margin:0px;padding:0px;border:0px">credentialWithUser:</span><span style="margin:0px;padding:0px;border:0px">PASSING_USERNAME</span></div>
<div style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:18px;margin:0px;padding:0px 0px 0px 10px;border:0px"><span style="white-space:pre-wrap">                </span><span style="margin:0px;padding:0px;border:0px">password</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">:</span><span style="margin:0px;padding:0px;border:0px">LOGIN_PASSWORD</span></div>
<div style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:18px;margin:0px;padding:0px 0px 0px 10px;border:0px"><span style="white-space:pre-wrap">        </span>        <span style="margin:0px;padding:0px;border:0px">persistence</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">:</span><span style="margin:0px;padding:0px;border:0px">NSURLCredentialPersistenceNone</span><span style="margin:0px;padding:0px;border:0px">]];</span></div>
<div style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:18px;margin:0px;padding:0px 0px 0px 10px;border:0px">&nbsp;&nbsp;&nbsp;&nbsp;<span style="margin:0px;padding:0px;border:0px">}];</span></div>
<div style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:18px;margin:0px;padding:0px 0px 0px 10px;border:0px"><span style="margin:0px;padding:0px;border:0px"><br>
</span></div></pre></div></div></blockquote><div><br></div><div style="">I do like it - it's clean!</div><div><br></div><div><br></div><div>&nbsp;</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word"><pre style="margin-top:0px;margin-bottom:0px;padding:0px;border:0px"><div style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:18px;margin:0px;padding:0px 0px 0px 10px;border:0px">
<span style="margin:0px;padding:0px;border:0px"></span></div><div style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:18px;margin:0px;padding:0px 0px 0px 10px;border:0px">
<span style="margin:0px;padding:0px;border:0px"><span style="font-family: Helvetica; font-size: medium; line-height: normal; white-space: normal; "><br></span></span></div><div style="margin:0px;padding:0px 0px 0px 10px;border:0px">
<span style="color:rgb(51,51,51);font-family:Helvetica;font-size:12px;line-height:18px;white-space:normal">Main point that we decided to go with that approach is that users are </span><span style="color:rgb(51,51,51);font-family:Helvetica;font-size:12px;line-height:18px;white-space:normal">familiar</span><font color="#333333" face="Helvetica"><span style="line-height:18px;white-space:normal">&nbsp;with the NSURLCredential object and is more&nbsp;straightforward to use instead of&nbsp;going through the authentication module 'login', 'logout' requests for this type of auth. &nbsp;</span></font><span style="line-height:18px;color:rgb(51,51,51);white-space:normal;font-family:Helvetica">It's a similar approach on what our underlying networking lib&nbsp;</span><span style="line-height:18px;color:rgb(51,51,51);white-space:normal;font-family:Helvetica">does when the user wants to set the credentials. </span></div>
</pre></div></blockquote><div><br></div><div style="">Fully agree - and this reflects what we discussed on the iOS team meeting (this is the mentioned follow-up).</div><div><br></div><div>&nbsp;</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word"><pre style="margin-top:0px;margin-bottom:0px;padding:0px;border:0px"><div style="margin:0px;padding:0px 0px 0px 10px;border:0px"><span style="line-height:18px;color:rgb(51,51,51);white-space:normal;font-family:Helvetica">A</span><font color="#333333" face="Helvetica"><span style="font-size:12px;line-height:18px;white-space:normal">&nbsp;note would be added for the user to be cautious when setting the persistence type (e.g.&nbsp;</span></font><span style="color:rgb(102,102,102);font-size:13px;white-space:normal;font-family:Courier,Consolas,monospace">NSURLCredentialPersistencePermanent) </span><span style=""><font color="#333333" face="Helvetica"><span style="line-height:18px;white-space:normal">so he can clear it up afterwards. &nbsp;</span></font></span></div>
</pre></div></blockquote><div><br></div><div style="">Ah, yeah - that's perfect and good!</div><div style=""><br></div><div style="">+1 on that</div><div>&nbsp;</div><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><pre style="margin-top:0px;margin-bottom:0px;padding:0px;border:0px"><div style="margin:0px;padding:0px 0px 0px 10px;border:0px"><span style="font-family:Helvetica;white-space:normal;color:rgb(51,51,51);font-size:12px;line-height:18px"><br>
</span></div><div style="margin:0px;padding:0px 0px 0px 10px;border:0px"><span style="font-family:Helvetica;white-space:normal;color:rgb(51,51,51);font-size:12px;line-height:18px">Thanks,</span></div><div style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:18px;margin:0px;padding:0px 0px 0px 10px;border:0px">
<span style="font-family:Helvetica;white-space:normal">Christos</span></div><div style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:18px;margin:0px;padding:0px 0px 0px 10px;border:0px">
<span style="font-family:Helvetica;white-space:normal"><br></span></div><div style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:18px;margin:0px;padding:0px 0px 0px 10px;border:0px">
<br></div></pre></div><div><div class="h5"><div><div>On Jun 3, 2013, at 4:32 PM, Matthias Wessendorf &lt;<a href="mailto:matzew@apache.org" target="_blank">matzew@apache.org</a>&gt; wrote:</div><br><blockquote type="cite">
<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jun 3, 2013 at 3:22 PM, Christos Vasilakis <span dir="ltr">&lt;<a href="mailto:cvasilak@gmail.com" target="_blank">cvasilak@gmail.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">Hi<div><br></div><div>I guess we can have both approaches </div></div></blockquote><div>

<br></div><div>Not sure if we would mix a bit too much here</div><div><br></div><div>&nbsp;</div><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>too and document the fact that care should be taken for the persistent type.&nbsp;</div><div><br></div><div>Further, another possible option allowing more more full control, is to expose as an option the underlying block that iOS provides so users can feed their own block. &nbsp;It is similar to the approach the underlying afnetworking library does for users to&nbsp;<a href="https://github.com/AFNetworking/AFNetworking/blob/master/AFNetworking/AFURLConnectionOperation.h#L320" target="_blank">configure</a>&nbsp;if they wish too.</div>

<div><br></div><div>In essence, something similar to:</div><div><br></div><pre style="margin-top:0px;margin-bottom:0px;padding:0px;border:0px;font-size:12px;font-family:Consolas,'Liberation Mono',Courier,monospace;color:rgb(51,51,51);line-height:18px"><div style="margin:0px;padding:0px 0px 0px 10px;border:0px">&nbsp;<span style="margin:0px;padding:0px;border:0px;color:rgb(68,85,136);font-weight:bold">id</span> <span style="margin:0px;padding:0px;border:0px;font-weight:bold">&lt;</span><span style="margin:0px;padding:0px;border:0px">AGPipe</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">&gt;</span> <span style="margin:0px;padding:0px;border:0px">pipe</span> <span style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span style="margin:0px;padding:0px;border:0px">[</span><span style="margin:0px;padding:0px;border:0px">_pipeline</span> <span style="margin:0px;padding:0px;border:0px">pipe</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">:^</span><span style="margin:0px;padding:0px;border:0px">(</span><span style="margin:0px;padding:0px;border:0px;color:rgb(68,85,136);font-weight:bold">id</span> <span style="margin:0px;padding:0px;border:0px;font-weight:bold">&lt;</span><span style="margin:0px;padding:0px;border:0px">AGPipeConfig</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">&gt;</span> <span style="margin:0px;padding:0px;border:0px">config</span><span style="margin:0px;padding:0px;border:0px">)</span> <span style="margin:0px;padding:0px;border:0px">{</span></div>

<div style="margin:0px;padding:0px 0px 0px 10px;border:0px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="margin:0px;padding:0px;border:0px">[</span><span style="margin:0px;padding:0px;border:0px">config</span> <span style="margin:0px;padding:0px;border:0px">setName</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">:</span><span style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">@"autobots"</span><span style="margin:0px;padding:0px;border:0px">];</span></div>

<div style="margin:0px;padding:0px 0px 0px 10px;border:0px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="margin:0px;padding:0px;border:0px;color:rgb(153,153,136);font-style:italic">// correct credentials</span></div><div style="margin:0px;padding:0px 0px 0px 10px;border:0px;background-color:rgb(255,255,204)">

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="margin:0px;padding:0px;border:0px">[</span><span style="margin:0px;padding:0px;border:0px">config</span> <span style="color:rgb(153,0,0);font-weight:bold">setAuthenticationChallengeBlock</span><span style="margin:0px;padding:0px;border:0px;font-weight:bold">:^</span><span style="margin:0px;padding:0px;border:0px">(</span><span style="margin:0px;padding:0px;border:0px">NSURLConnection</span> <span style="margin:0px;padding:0px;border:0px;font-weight:bold">*</span><span style="margin:0px;padding:0px;border:0px">connection</span><span style="margin:0px;padding:0px;border:0px">,</span> <span style="margin:0px;padding:0px;border:0px">NSURLAuthenticationChallenge</span> <span style="margin:0px;padding:0px;border:0px;font-weight:bold">*</span><span style="margin:0px;padding:0px;border:0px">challenge</span><span style="margin:0px;padding:0px;border:0px">) {</span></div>

<div style="margin:0px;padding:0px 0px 0px 10px;border:0px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// create the credentials and server them to the challenge request  </div><div style="margin:0px;padding:0px 0px 0px 10px;border:0px">&nbsp;&nbsp;&nbsp;&nbsp;<span style="margin:0px;padding:0px;border:0px">}];</span></div>

</pre><div><br></div><div>Wdyt?</div></div></blockquote><div><br></div><div>Not sure on that as well. Right now we configure initial state/params. Not sure we should really do extend the config to also accept "blocks/functions" to react on&nbsp;behaviour. Hrm...&nbsp;</div>

<div><br></div><div><br></div><div><br></div><div><br></div><div>&nbsp;</div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">

<span><font color="#888888"><div><br></div><div>Christos</div></font></span><div><div><br></div><div><br></div><div><div><div>On May 29, 2013, at 1:27 PM, Matthias Wessendorf &lt;<a href="mailto:matzew@apache.org" target="_blank">matzew@apache.org</a>&gt; wrote:</div>

<blockquote type="cite"><div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, May 29, 2013 at 12:18 PM, Bruno Oliveira <span dir="ltr">&lt;<a href="mailto:bruno@abstractj.org" target="_blank">bruno@abstractj.org</a>&gt;</span> wrote:<br>



<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi, sorry for my n00bish. I like the idea of libraries to make<br>




developer's life easier, I just have few questions.<br>
<br>
Is possible to have both into AGAuthenticationModuleAdapter?<br>
NSURLCredential for developers pretty familiar with it (and wants full<br>
control) &nbsp;and HTTPBasicDigestAuthenticationModule for developer who want<br>
to keep it simple?<br></blockquote><div><br></div><div>Interesting point. Let me think about it</div><div><br></div><div>&nbsp;</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">




<br>
Another question? Why not HTTPAuthenticationModule? With the addition of<br>
more auth schemes you will end with something like<br>
HTTPBasicDigestHawkPersonaOAuth2AuthenticationModule.<br></blockquote><div><br></div><div><br></div><div>oh, right :) yeah, let's name it AG<span style="font-family:arial,sans-serif;font-size:13px">HTTPAuthenticationModule.h/m. Good point</span></div>



<div>&nbsp;</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div><br>
<br>
<br>
Corinne Krych wrote:<br>
&gt; Thanks for the clarification.<br>
&gt; I think I didn't get it.<br>
&gt; Indeed it should be well documented &nbsp;as you would expect a login action<br>
&gt; (ie doing an actual login on endpoint) when sending a login message.<br>
&gt; saveLoginCredentials would be the correct message but I guess we rather<br>
&gt; stick to AGAuthenticationModuleAdapter protocol.<br>
&gt;<br>
&gt; +1<br>
&gt; Corinne<br>
&gt;<br>
&gt;<br>
&gt; On 29 May 2013 11:13, Matthias Wessendorf &lt;<a href="mailto:matzew@apache.org" target="_blank">matzew@apache.org</a><br>
</div><div>&gt; &lt;mailto:<a href="mailto:matzew@apache.org" target="_blank">matzew@apache.org</a>&gt;&gt; wrote:<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; &nbsp; &nbsp; On Wed, May 29, 2013 at 10:20 AM, Christos Vasilakis<br>
</div><div>&gt; &nbsp; &nbsp; &lt;<a href="mailto:cvasilak@gmail.com" target="_blank">cvasilak@gmail.com</a> &lt;mailto:<a href="mailto:cvasilak@gmail.com" target="_blank">cvasilak@gmail.com</a>&gt;&gt; wrote:<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; Hi,<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; iOS platform provides built-in implementations for<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; authenticating against HTTP endpoints that support Basic /<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; Digest authentication (among others). The workflow when iOS<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; tries to authenticate against those endpoints is basically:<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; a) A credential storage singleton object<br>
</div>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &lt;<a href="https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSURLCredentialStorage_Class/Reference/Reference.html" target="_blank">https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSURLCredentialStorage_Class/Reference/Reference.html</a>&gt; provided<br>




<div>&gt; &nbsp; &nbsp; &nbsp; &nbsp; by the system is consulted for authentication credentials. If<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; credentials are found, the system proceeds with authentication.<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; Understandably for this to work, the developer has to initially<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; push the credentials to the system object (and remove when done).<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; b) If credentials are NOT found, the system tries to call the<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; delegate method e.g.<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; 'connection:didReceiveAuthenticationChallenge<br>
</div>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &lt;<a href="http://developer.apple.com/library/mac/documentation/Foundation/Reference/NSURLConnectionDelegate_Protocol/Reference/Reference.html#//apple_ref/occ/intfm/NSURLConnectionDelegate/connection:didReceiveAuthenticationChallenge" target="_blank">http://developer.apple.com/library/mac/documentation/Foundation/Reference/NSURLConnectionDelegate_Protocol/Reference/Reference.html#//apple_ref/occ/intfm/NSURLConnectionDelegate/connection:didReceiveAuthenticationChallenge</a>:&gt;',<br>




<div>&gt; &nbsp; &nbsp; &nbsp; &nbsp; giving a chance for the user to provide the credentials, by<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; calling the appropriate methods on the authentication challenge<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; object passed in.<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; AeroGear library, &nbsp;currently has a notion of pluggable<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; authentication modules providing an interface for clients to<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; implement 'login', and 'logout' methods, depending on the<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; authentication scenarios that they try to support. This fits<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; nicely with singleton credential storage approach, in the sense<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; when doing 'login' and 'logout', we simply edit the credential<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; storage adding or removing credentials appropriately. A branch<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; for this work can be found here<br>
</div>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &lt;<a href="https://github.com/cvasilak/aerogear-ios/tree/basic.digest.auth" target="_blank">https://github.com/cvasilak/aerogear-ios/tree/basic.digest.auth</a>&gt;.<br>
<div>&gt; &nbsp; &nbsp; &nbsp; &nbsp; For usage, have a look at our integration test<br>
</div>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &lt;<a href="https://github.com/cvasilak/aerogear-ios-integration/blob/basic.digest.auth/AeroGear-iOS-Integration/AeroGear-iOS-IntegrationTests/AGHttpBasicAuthenticationTests.m" target="_blank">https://github.com/cvasilak/aerogear-ios-integration/blob/basic.digest.auth/AeroGear-iOS-Integration/AeroGear-iOS-IntegrationTests/AGHttpBasicAuthenticationTests.m</a>&gt;<br>




<div>&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; For testing purposes, another branch<br>
</div>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &lt;<a href="https://github.com/cvasilak/aerogear-ios/tree/basic.digest.nsurlcredential" target="_blank">https://github.com/cvasilak/aerogear-ios/tree/basic.digest.nsurlcredential</a>&gt; was<br>
<div>&gt; &nbsp; &nbsp; &nbsp; &nbsp; created, this time letting the user to directly pass<br>
</div>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &lt;<a href="https://github.com/cvasilak/aerogear-ios-integration/blob/basic.digest.nsurlcredential/AeroGear-iOS-Integration/AeroGear-iOS-IntegrationTests/AGHttpBasicAuthenticationTests.m#L50" target="_blank">https://github.com/cvasilak/aerogear-ios-integration/blob/basic.digest.nsurlcredential/AeroGear-iOS-Integration/AeroGear-iOS-IntegrationTests/AGHttpBasicAuthenticationTests.m#L50</a>&gt; an<br>




&gt; &nbsp; &nbsp; &nbsp; &nbsp; NSURLCredential<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &lt;<a href="http://developer.apple.com/library/ios/#Documentation/Cocoa/Reference/Foundation/Classes/NSURLCredential_Class/Reference/Reference.html" target="_blank">http://developer.apple.com/library/ios/#Documentation/Cocoa/Reference/Foundation/Classes/NSURLCredential_Class/Reference/Reference.html</a>&gt; object<br>




<div>&gt; &nbsp; &nbsp; &nbsp; &nbsp; initialised with the username/password combination during the<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; Pipe configuration. Those credentials are internally stored and<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; given back to the system by implementing the necessary callback<br>
</div>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &lt;<a href="https://github.com/cvasilak/aerogear-ios/blob/basic.digest.nsurlcredential/AeroGear-iOS/AeroGear-iOS/core/AGHttpClient.m#L240" target="_blank">https://github.com/cvasilak/aerogear-ios/blob/basic.digest.nsurlcredential/AeroGear-iOS/AeroGear-iOS/core/AGHttpClient.m#L240</a>&gt;.<br>




<div>&gt; &nbsp; &nbsp; &nbsp; &nbsp; A usage example can be found in our integration test<br>
</div>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &lt;<a href="https://github.com/cvasilak/aerogear-ios-integration/blob/basic.digest.nsurlcredential/AeroGear-iOS-Integration/AeroGear-iOS-IntegrationTests/AGHttpBasicAuthenticationTests.m" target="_blank">https://github.com/cvasilak/aerogear-ios-integration/blob/basic.digest.nsurlcredential/AeroGear-iOS-Integration/AeroGear-iOS-IntegrationTests/AGHttpBasicAuthenticationTests.m</a>&gt;<br>




<div>&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; advantages of using the singleton approach:<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; - fits nicely with the authentication mechanism we have in place<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; (as an extension HTTPBasicDigestAuthenticationModule<br>
</div>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &lt;<a href="https://github.com/cvasilak/aerogear-ios/blob/basic.digest.auth/AeroGear-iOS/AeroGear-iOS/security/AGHttpBasicDigestAuthentication.m" target="_blank">https://github.com/cvasilak/aerogear-ios/blob/basic.digest.auth/AeroGear-iOS/AeroGear-iOS/security/AGHttpBasicDigestAuthentication.m</a>&gt;)<br>




<div>&gt; &nbsp; &nbsp; &nbsp; &nbsp; so user familiarity when looking to add basic/digest support to<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; the Pipe.<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; - we control the credential type e.g.<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; 'NSURLCredentialPersistenceForSession'. This eliminates errors<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; of using 'NSURLCredentialPersistencePermanent' and having the<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; user to explicitly clear the keychain when trying to login with<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; a different combination. For my search, many errors occurs<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; because of this.<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; disadvantages of using the singleton approach:<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; - not sure if many iOS dev will like the fact of creating an<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; Authenticator object instead of using directly an<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; NSURLCredential object that are used to.<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; ---<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; advantages of using the 'nsurlcredential' directly:<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; - users familiarity with the object.<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; - not explicit login logout request.<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; disadvantages of using the 'nsurlcredential' directly:<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; - error credential type can lead to errors.<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; With discussions with Matthias, we are more keen in following<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; the HTTPBasicDigestAuthenticationModule<br>
</div>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &lt;<a href="https://github.com/cvasilak/aerogear-ios/blob/basic.digest.auth/AeroGear-iOS/AeroGear-iOS/security/AGHttpBasicDigestAuthentication.m" target="_blank">https://github.com/cvasilak/aerogear-ios/blob/basic.digest.auth/AeroGear-iOS/AeroGear-iOS/security/AGHttpBasicDigestAuthentication.m</a>&gt; approach<br>




<div>&gt; &nbsp; &nbsp; &nbsp; &nbsp; instead of providing the NSURLCredential<br>
</div>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &lt;<a href="http://developer.apple.com/library/ios/#Documentation/Cocoa/Reference/Foundation/Classes/NSURLCredential_Class/Reference/Reference.html" target="_blank">http://developer.apple.com/library/ios/#Documentation/Cocoa/Reference/Foundation/Classes/NSURLCredential_Class/Reference/Reference.html</a>&gt; configuration<br>




<div>&gt; &nbsp; &nbsp; &nbsp; &nbsp; option on the Pipe. Surely enough, in the documentation we will<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; explicitly state that "login"/ "logout" methods, &nbsp;serve as a<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; mean to setup internally the iOS authentication system so users<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; don't have too (instead of calling remote endpoints)<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; &nbsp; &nbsp; While the "NSURLCredential" better fits the meanings of BASIC/DIGEST<br>
&gt; &nbsp; &nbsp; (no explicit login/logout against a server), however that will cause<br>
&gt; &nbsp; &nbsp; all sorts of issues, since the APP_DEVELOPER is reponsible for<br>
&gt; &nbsp; &nbsp; providing the NSURLCredential; If we uses a _permanent_ storage, all<br>
&gt; &nbsp; &nbsp; sorts of errors may occur (like Christos was already indicating).<br>
&gt;<br>
&gt;<br>
&gt; &nbsp; &nbsp; I (currently) like the "auth_module" approach better. However, as<br>
&gt; &nbsp; &nbsp; Christos mentioned, we need to state (in API docs) that login/logout<br>
&gt; &nbsp; &nbsp; is JUST applying/removing the credentials. The doc needs to say that<br>
&gt; &nbsp; &nbsp; on LOGIN (for instance) no request is hit against the server.<br>
&gt;<br>
&gt;<br>
&gt; &nbsp; &nbsp; -Matthias<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; Wdyt?<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; Thanks,<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; Christos<br>
&gt;<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; _______________________________________________<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; aerogear-dev mailing list<br>
</div>&gt; &nbsp; &nbsp; &nbsp; &nbsp; <a href="mailto:aerogear-dev@lists.jboss.org" target="_blank">aerogear-dev@lists.jboss.org</a> &lt;mailto:<a href="mailto:aerogear-dev@lists.jboss.org" target="_blank">aerogear-dev@lists.jboss.org</a>&gt;<br>



<div>&gt; &nbsp; &nbsp; &nbsp; &nbsp; <a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; &nbsp; &nbsp; --<br>
&gt; &nbsp; &nbsp; Matthias Wessendorf<br>
&gt;<br>
&gt; &nbsp; &nbsp; blog: <a href="http://matthiaswessendorf.wordpress.com/" target="_blank">http://matthiaswessendorf.wordpress.com/</a><br>
&gt; &nbsp; &nbsp; sessions: <a href="http://www.slideshare.net/mwessendorf" target="_blank">http://www.slideshare.net/mwessendorf</a><br>
&gt; &nbsp; &nbsp; twitter: <a href="http://twitter.com/mwessendorf" target="_blank">http://twitter.com/mwessendorf</a><br>
&gt;<br>
&gt; &nbsp; &nbsp; _______________________________________________<br>
&gt; &nbsp; &nbsp; aerogear-dev mailing list<br>
</div>&gt; &nbsp; &nbsp; <a href="mailto:aerogear-dev@lists.jboss.org" target="_blank">aerogear-dev@lists.jboss.org</a> &lt;mailto:<a href="mailto:aerogear-dev@lists.jboss.org" target="_blank">aerogear-dev@lists.jboss.org</a>&gt;<br>



&gt; &nbsp; &nbsp; <a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>
<div>&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; aerogear-dev mailing list<br>
&gt; <a href="mailto:aerogear-dev@lists.jboss.org" target="_blank">aerogear-dev@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>
_______________________________________________<br>
aerogear-dev mailing list<br>
<a href="mailto:aerogear-dev@lists.jboss.org" target="_blank">aerogear-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>
</div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Matthias Wessendorf <br><br>blog: <a href="http://matthiaswessendorf.wordpress.com/" target="_blank">http://matthiaswessendorf.wordpress.com/</a><br>

sessions: <a href="http://www.slideshare.net/mwessendorf" target="_blank">http://www.slideshare.net/mwessendorf</a><br>twitter: <a href="http://twitter.com/mwessendorf" target="_blank">http://twitter.com/mwessendorf</a>
</div></div>
_______________________________________________<br>aerogear-dev mailing list<br><a href="mailto:aerogear-dev@lists.jboss.org" target="_blank">aerogear-dev@lists.jboss.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a></blockquote>

</div><br></div></div></div><br>_______________________________________________<br>
aerogear-dev mailing list<br>
<a href="mailto:aerogear-dev@lists.jboss.org" target="_blank">aerogear-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Matthias Wessendorf <br>

<br>blog: <a href="http://matthiaswessendorf.wordpress.com/" target="_blank">http://matthiaswessendorf.wordpress.com/</a><br>sessions: <a href="http://www.slideshare.net/mwessendorf" target="_blank">http://www.slideshare.net/mwessendorf</a><br>

twitter: <a href="http://twitter.com/mwessendorf" target="_blank">http://twitter.com/mwessendorf</a>
</div></div>
_______________________________________________<br>aerogear-dev mailing list<br><a href="mailto:aerogear-dev@lists.jboss.org" target="_blank">aerogear-dev@lists.jboss.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a></blockquote>
</div><br></div></div></div><br>_______________________________________________<br>
aerogear-dev mailing list<br>
<a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Matthias Wessendorf <br>
<br>blog: <a href="http://matthiaswessendorf.wordpress.com/" target="_blank">http://matthiaswessendorf.wordpress.com/</a><br>sessions: <a href="http://www.slideshare.net/mwessendorf" target="_blank">http://www.slideshare.net/mwessendorf</a><br>
twitter: <a href="http://twitter.com/mwessendorf" target="_blank">http://twitter.com/mwessendorf</a>
</div></div>
_______________________________________________<br>aerogear-dev mailing list<br><a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>https://lists.jboss.org/mailman/listinfo/aerogear-dev</blockquote></div><br></body></html>