<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments for a walking city</title>
	<atom:link href="http://awalkingcity.com/blog/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://awalkingcity.com/blog</link>
	<description></description>
	<lastBuildDate>Wed, 21 Dec 2011 12:24:53 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
	<item>
		<title>Comment on QR Codes Made Easy In Android by ntt</title>
		<link>http://awalkingcity.com/blog/2008/08/25/qr-codes-made-easy-in-android/comment-page-1/#comment-571</link>
		<dc:creator>ntt</dc:creator>
		<pubDate>Wed, 21 Dec 2011 12:24:53 +0000</pubDate>
		<guid isPermaLink="false">http://awalkingcity.com/blog/?p=39#comment-571</guid>
		<description>hi
can you share simple source code of scanning QR code using zxing and getting back a result?
there&#039;s not much resources, turtorial and complete source code for doing this simple thing.
very nice writeup.</description>
		<content:encoded><![CDATA[<p>hi<br />
can you share simple source code of scanning QR code using zxing and getting back a result?<br />
there&#8217;s not much resources, turtorial and complete source code for doing this simple thing.<br />
very nice writeup.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Qr Codes Made Even Easier With Android by Qr Codes With Android &#171; erics2011</title>
		<link>http://awalkingcity.com/blog/2008/10/23/qr-codes-made-even-easier-with-android/comment-page-1/#comment-531</link>
		<dc:creator>Qr Codes With Android &#171; erics2011</dc:creator>
		<pubDate>Mon, 01 Aug 2011 11:44:17 +0000</pubDate>
		<guid isPermaLink="false">http://awalkingcity.com/blog/?p=116#comment-531</guid>
		<description>[...] Original Links: http://awalkingcity.com/blog/2008/10/23/qr-codes-made-even-easier-with-android/ [...]</description>
		<content:encoded><![CDATA[<p>[...] Original Links: http://awalkingcity.com/blog/2008/10/23/qr-codes-made-even-easier-with-android/ [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Android OpenGL ES 2.0 Progress by Ramya</title>
		<link>http://awalkingcity.com/blog/2010/02/26/android-opengl-es-2-0-progress/comment-page-1/#comment-528</link>
		<dc:creator>Ramya</dc:creator>
		<pubDate>Fri, 22 Jul 2011 19:05:28 +0000</pubDate>
		<guid isPermaLink="false">http://awalkingcity.com/blog/?p=379#comment-528</guid>
		<description>Can you make the source code available for the above examples??

Thanks.</description>
		<content:encoded><![CDATA[<p>Can you make the source code available for the above examples??</p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on HoneyGram: Instagram Browser For Honeycomb by michael borders</title>
		<link>http://awalkingcity.com/blog/2011/04/10/honeygram-instagram-browser-for-honeycomb/comment-page-1/#comment-525</link>
		<dc:creator>michael borders</dc:creator>
		<pubDate>Wed, 29 Jun 2011 03:16:41 +0000</pubDate>
		<guid isPermaLink="false">http://awalkingcity.com/blog/?p=797#comment-525</guid>
		<description>you should have this available for download for those of us who have rooted nook colors!</description>
		<content:encoded><![CDATA[<p>you should have this available for download for those of us who have rooted nook colors!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Android:  Fun With Speech Recognition by Salvatore</title>
		<link>http://awalkingcity.com/blog/2009/02/10/android-fun-with-speech-recognition/comment-page-1/#comment-523</link>
		<dc:creator>Salvatore</dc:creator>
		<pubDate>Wed, 01 Jun 2011 09:36:56 +0000</pubDate>
		<guid isPermaLink="false">http://awalkingcity.com/blog/?p=140#comment-523</guid>
		<description>Hi,
it&#039;s possible have the entire code for the example above?
How can I manage the resul?</description>
		<content:encoded><![CDATA[<p>Hi,<br />
it&#8217;s possible have the entire code for the example above?<br />
How can I manage the resul?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on QR Codes Made Easy In Android by Ricard</title>
		<link>http://awalkingcity.com/blog/2008/08/25/qr-codes-made-easy-in-android/comment-page-1/#comment-503</link>
		<dc:creator>Ricard</dc:creator>
		<pubDate>Tue, 12 Apr 2011 09:06:18 +0000</pubDate>
		<guid isPermaLink="false">http://awalkingcity.com/blog/?p=39#comment-503</guid>
		<description>Can you give me the full source brother? I can pay...</description>
		<content:encoded><![CDATA[<p>Can you give me the full source brother? I can pay&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Basic Authentication and Grails by Sebastian</title>
		<link>http://awalkingcity.com/blog/2008/03/07/basic-authentication-and-grails/comment-page-1/#comment-498</link>
		<dc:creator>Sebastian</dc:creator>
		<pubDate>Fri, 25 Mar 2011 13:56:02 +0000</pubDate>
		<guid isPermaLink="false">http://awalkingcity.com/blog/?p=12#comment-498</guid>
		<description>Thanks for the tip. One small bug in Romains code:

&lt;code&gt;
if(!ValidationUtil.validate(request,response, log, grailsApplication)){
render(text: &quot;User not known.&quot;)
return
}
}
&lt;/code&gt;

must read

&lt;code&gt;
if(!ValidationUtil.validate(request,response, log, grailsApplication)){
render(text: &quot;User not known.&quot;)
return &lt;em&gt;false&lt;/em&gt;
}
}
&lt;/code&gt;

in order to prevent execution of the action if the user is not logged in.</description>
		<content:encoded><![CDATA[<p>Thanks for the tip. One small bug in Romains code:</p>
<p><code><br />
if(!ValidationUtil.validate(request,response, log, grailsApplication)){<br />
render(text: "User not known.")<br />
return<br />
}<br />
}<br />
</code></p>
<p>must read</p>
<p><code><br />
if(!ValidationUtil.validate(request,response, log, grailsApplication)){<br />
render(text: "User not known.")<br />
return <em>false</em><br />
}<br />
}<br />
</code></p>
<p>in order to prevent execution of the action if the user is not logged in.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on QR Codes Made Easy In Android by Romain</title>
		<link>http://awalkingcity.com/blog/2008/08/25/qr-codes-made-easy-in-android/comment-page-1/#comment-497</link>
		<dc:creator>Romain</dc:creator>
		<pubDate>Mon, 21 Mar 2011 13:48:22 +0000</pubDate>
		<guid isPermaLink="false">http://awalkingcity.com/blog/?p=39#comment-497</guid>
		<description>I&#039;m interest too by the full source code of the WebView,can you provide it ?</description>
		<content:encoded><![CDATA[<p>I&#8217;m interest too by the full source code of the WebView,can you provide it ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Basic Authentication and Grails by Romain</title>
		<link>http://awalkingcity.com/blog/2008/03/07/basic-authentication-and-grails/comment-page-1/#comment-495</link>
		<dc:creator>Romain</dc:creator>
		<pubDate>Thu, 24 Feb 2011 10:31:19 +0000</pubDate>
		<guid isPermaLink="false">http://awalkingcity.com/blog/?p=12#comment-495</guid>
		<description>I changed you code in order to log with a login and password in the configuration file.

I also add the WWW-Authenticate in order to respect the standard : 
&lt;code&gt;
  response.addHeader(&quot;WWW-Authenticate&quot;, &quot;Basic realm=\&quot;Secure Area\&quot;&quot;)
&lt;/code&gt;
&lt;code&gt;
class SecurityFilters {
    def grailsApplication
    def filters = {
        basicAuth(controller: &#039;prospect&#039;, action: &#039;*&#039;) {
            before = {
                if(!ValidationUtil.validate(request,response, log, grailsApplication)){
                  render(text: &quot;User not known.&quot;)
                  return
                }
            }
        }

        basicAuth(controller: &#039;hash&#039;, action: &#039;*&#039;) {
            before = {
                if(!ValidationUtil.validate(request,response, log, grailsApplication)){
                  render(text: &quot;User not known.&quot;)
                  return
                }
            }
        }

    }
}

/**
 * Basic Authentication
 * return false if login failed, and true if login is successful
 *
 * The HTTP status code and the HTTP header of the response are set as this :
 *
 * &quot;Authorization&quot; not present in the header of the request :
 *  - status : 401
 *  - add hedaer : WWW-Authenticate: Basic realm=&quot;Secure Area&quot;
 *
 *  &quot;Authorization&quot; present, but bad login / password
 *  - status : 403
 *
 */
class ValidationUtil{
    static validate(def request, def response, def log, def grailsApplication){
            try {
                def authString = request.getHeader(&#039;Authorization&#039;)
                if (!authString) {
                    response.status = 401
                    response.addHeader(&quot;WWW-Authenticate&quot;, &quot;Basic realm=\&quot;Secure Area\&quot;&quot;)
                    return false
                }
                def encodedPair = authString - &#039;Basic &#039;
                def decodedPair = new String(new sun.misc.BASE64Decoder().decodeBuffer(encodedPair));
                def credentials = decodedPair.split(&#039;:&#039;)
                def login = grailsApplication.config.admin.security.login
                def password = grailsApplication.config.admin.security.password

                if (login.equals(credentials[0]) &amp;&amp; password.equals(credentials[1])) {
                    return true
                } else {
                    log.warn(&quot;User not known&quot;)
                    response.status = 403
                    return false
                }
            } catch (Exception e) {
                log.warn(&quot;User not known&quot;, e)
                response.status = 403
                return false
            }
        }
}
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>I changed you code in order to log with a login and password in the configuration file.</p>
<p>I also add the WWW-Authenticate in order to respect the standard :<br />
<code><br />
  response.addHeader("WWW-Authenticate", "Basic realm=\"Secure Area\"")<br />
</code><br />
<code><br />
class SecurityFilters {<br />
    def grailsApplication<br />
    def filters = {<br />
        basicAuth(controller: 'prospect', action: '*') {<br />
            before = {<br />
                if(!ValidationUtil.validate(request,response, log, grailsApplication)){<br />
                  render(text: "User not known.")<br />
                  return<br />
                }<br />
            }<br />
        }</p>
<p>        basicAuth(controller: 'hash', action: '*') {<br />
            before = {<br />
                if(!ValidationUtil.validate(request,response, log, grailsApplication)){<br />
                  render(text: "User not known.")<br />
                  return<br />
                }<br />
            }<br />
        }</p>
<p>    }<br />
}</p>
<p>/**<br />
 * Basic Authentication<br />
 * return false if login failed, and true if login is successful<br />
 *<br />
 * The HTTP status code and the HTTP header of the response are set as this :<br />
 *<br />
 * "Authorization" not present in the header of the request :<br />
 *  - status : 401<br />
 *  - add hedaer : WWW-Authenticate: Basic realm="Secure Area"<br />
 *<br />
 *  "Authorization" present, but bad login / password<br />
 *  - status : 403<br />
 *<br />
 */<br />
class ValidationUtil{<br />
    static validate(def request, def response, def log, def grailsApplication){<br />
            try {<br />
                def authString = request.getHeader('Authorization')<br />
                if (!authString) {<br />
                    response.status = 401<br />
                    response.addHeader("WWW-Authenticate", "Basic realm=\"Secure Area\"")<br />
                    return false<br />
                }<br />
                def encodedPair = authString - 'Basic '<br />
                def decodedPair = new String(new sun.misc.BASE64Decoder().decodeBuffer(encodedPair));<br />
                def credentials = decodedPair.split(':')<br />
                def login = grailsApplication.config.admin.security.login<br />
                def password = grailsApplication.config.admin.security.password</p>
<p>                if (login.equals(credentials[0]) &amp;&amp; password.equals(credentials[1])) {<br />
                    return true<br />
                } else {<br />
                    log.warn("User not known")<br />
                    response.status = 403<br />
                    return false<br />
                }<br />
            } catch (Exception e) {<br />
                log.warn("User not known", e)<br />
                response.status = 403<br />
                return false<br />
            }<br />
        }<br />
}<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on QR Codes Made Easy In Android by Sujith</title>
		<link>http://awalkingcity.com/blog/2008/08/25/qr-codes-made-easy-in-android/comment-page-1/#comment-492</link>
		<dc:creator>Sujith</dc:creator>
		<pubDate>Thu, 03 Feb 2011 07:55:24 +0000</pubDate>
		<guid isPermaLink="false">http://awalkingcity.com/blog/?p=39#comment-492</guid>
		<description>Can you provide the full source code of the WebView (You have mentioned it later). I am exactly working on the same.</description>
		<content:encoded><![CDATA[<p>Can you provide the full source code of the WebView (You have mentioned it later). I am exactly working on the same.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
