summaryrefslogblamecommitdiffstats
path: root/archives/extend/attachments/20140306/a517215b/attachment.html
blob: 9f53e9df6f1fe92190eeed5940f5ddb3bf83139c (plain) (tree)
1
2
3
4
5
6
7






                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
<tt>
&lt;div&nbsp;dir=&quot;ltr&quot;&gt;Hi,&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;I&nbsp;want&nbsp;to&nbsp;create&nbsp;a&nbsp;module&nbsp;that&nbsp;basically&nbsp;sits&nbsp;between&nbsp;the&nbsp;incoming&nbsp;request&nbsp;and&nbsp;the&nbsp;http&nbsp;handler&nbsp;for&nbsp;that&nbsp;request&nbsp;to&nbsp;ensure&nbsp;a&nbsp;request&nbsp;is&nbsp;authenticated&nbsp;(using&nbsp;a&nbsp;cookie),&nbsp;if&nbsp;the&nbsp;request&nbsp;is&nbsp;not&nbsp;authenticated&nbsp;then&nbsp;I&nbsp;like&nbsp;to&nbsp;redirect&nbsp;to&nbsp;a&nbsp;specific&nbsp;login&nbsp;page&nbsp;(which&nbsp;should&nbsp;not&nbsp;be&nbsp;filtered).&lt;/div&gt;<br>
&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Is&nbsp;this&nbsp;possible&nbsp;with&nbsp;Cowboy?&nbsp;Should&nbsp;I&nbsp;use&nbsp;the&nbsp;onrequest&nbsp;hook&nbsp;(not&nbsp;sure&nbsp;if&nbsp;I&nbsp;can&nbsp;force&nbsp;redirects&nbsp;from&nbsp;there)&nbsp;for&nbsp;that&nbsp;or&nbsp;is&nbsp;there&nbsp;a&nbsp;better&nbsp;way?&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Cheers,&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;<br>
-Mark&lt;br&nbsp;clear=&quot;all&quot;&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;--&nbsp;&lt;br&gt;&lt;div&nbsp;dir=&quot;ltr&quot;&gt;Mark&nbsp;Nijhof&lt;br&gt;&lt;div&gt;&lt;div&gt;t:&nbsp;&nbsp;&lt;a&nbsp;href=&quot;https://twitter.com/MarkNijhof&quot;&nbsp;target=&quot;_blank&quot;&gt;@MarkNijhof&lt;/a&gt;&lt;br&gt;s:&nbsp;�marknijhof&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;<br>
&lt;/div&gt;&lt;/div&gt;<br>

</tt>