<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Ruby-Web-Sessions-Exercise, branch solution</title>
<subtitle>An exercise that demonstrates how to leverage server-side web sessions for authentication</subtitle>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/Ruby-Web-Sessions-Exercise/'/>
<entry>
<title>Delete config.ru</title>
<updated>2015-12-08T06:37:51+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2015-12-08T06:37:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/Ruby-Web-Sessions-Exercise/commit/?id=92e495d058301cce20e92130804faf5850b44c7a'/>
<id>92e495d058301cce20e92130804faf5850b44c7a</id>
<content type='text'>
As of 28770a5143bb5b48389d5ad4ce235625c12f1056 we no longer need this
file as the server should now be started with `ruby app.rb` instead of
`rackup`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As of 28770a5143bb5b48389d5ad4ce235625c12f1056 we no longer need this
file as the server should now be started with `ruby app.rb` instead of
`rackup`.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add logged_in.erb template</title>
<updated>2015-12-08T06:29:47+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2015-12-08T06:29:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/Ruby-Web-Sessions-Exercise/commit/?id=8513c8d87e21ab477a438962bac8ad63c8987789'/>
<id>8513c8d87e21ab477a438962bac8ad63c8987789</id>
<content type='text'>
Template that displays when the user is logged in.

Adjust the login test to check for the text in this template.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Template that displays when the user is logged in.

Adjust the login test to check for the text in this template.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add layout.erb</title>
<updated>2015-12-08T06:26:57+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2015-12-08T06:26:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/Ruby-Web-Sessions-Exercise/commit/?id=a6c33077c7ac124e6c4db6ad272ab67226aba354'/>
<id>a6c33077c7ac124e6c4db6ad272ab67226aba354</id>
<content type='text'>
Move boilerplate code from `index.erb` into `layout.erb` to allow us to
use it in additional templates.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Move boilerplate code from `index.erb` into `layout.erb` to allow us to
use it in additional templates.
</pre>
</div>
</content>
</entry>
<entry>
<title>auth_test.rb: Add logout test</title>
<updated>2015-12-08T06:22:02+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2015-12-08T06:22:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/Ruby-Web-Sessions-Exercise/commit/?id=61e3141fb526e6a967e9eee01de4fae474b4e9cc'/>
<id>61e3141fb526e6a967e9eee01de4fae474b4e9cc</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>auth_test.rb: Create login helpers</title>
<updated>2015-12-08T06:17:26+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2015-12-08T06:17:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/Ruby-Web-Sessions-Exercise/commit/?id=6eef2d15e7935dc21580dd7c9e4042d3b8564b4d'/>
<id>6eef2d15e7935dc21580dd7c9e4042d3b8564b4d</id>
<content type='text'>
Create a couple new methods to extract login functionality and remove
duplicate test code.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Create a couple new methods to extract login functionality and remove
duplicate test code.
</pre>
</div>
</content>
</entry>
<entry>
<title>index.erb: Make password field `type=password`</title>
<updated>2015-12-08T06:12:00+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2015-12-08T06:12:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/Ruby-Web-Sessions-Exercise/commit/?id=57b6cac65f2979f948dcfc77e027d8aa54a000ca'/>
<id>57b6cac65f2979f948dcfc77e027d8aa54a000ca</id>
<content type='text'>
So that the characters get masked.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
So that the characters get masked.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add test for unrecognised user</title>
<updated>2015-12-08T06:10:52+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2015-12-08T06:10:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/Ruby-Web-Sessions-Exercise/commit/?id=cb06860fa4cd9083eb84929a70353ebe7c7cea18'/>
<id>cb06860fa4cd9083eb84929a70353ebe7c7cea18</id>
<content type='text'>
When logging in with unrecognised credentials, the response should
include "Unrecognized user".
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When logging in with unrecognised credentials, the response should
include "Unrecognized user".
</pre>
</div>
</content>
</entry>
<entry>
<title>app.rb: Add basic session handling</title>
<updated>2015-12-08T05:51:14+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2015-12-08T05:51:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/Ruby-Web-Sessions-Exercise/commit/?id=6b352f5a238524f9031c499191a476debecbc9fb'/>
<id>6b352f5a238524f9031c499191a476debecbc9fb</id>
<content type='text'>
When logging in with the correct credentials, set a session variable and
redirect to the login page. Custom display for a user who is logged in.

Add a logout method to delete the session variable, thus logging out the
user.

Use Rack's built-in session cookies to facilitate session management.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When logging in with the correct credentials, set a session variable and
redirect to the login page. Custom display for a user who is logged in.

Add a logout method to delete the session variable, thus logging out the
user.

Use Rack's built-in session cookies to facilitate session management.
</pre>
</div>
</content>
</entry>
<entry>
<title>app.rb: Remove Sinatra::Base application wrapper</title>
<updated>2015-12-08T05:28:52+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2015-12-08T05:28:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/Ruby-Web-Sessions-Exercise/commit/?id=28770a5143bb5b48389d5ad4ce235625c12f1056'/>
<id>28770a5143bb5b48389d5ad4ce235625c12f1056</id>
<content type='text'>
Don't wrap our routes/controllers in a `Sinatra::Base` class to keep
things simple. Was doing this because I thought I needed to in order to
be able to tell Capybara where the application was but looking at the
Sinatra testing page (http://www.sinatrarb.com/testing.html), they
provide an example for Capybara that details this
`Sinatra::Application.new` call that I can make instead. This frees us
up to use the simplified application definition.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Don't wrap our routes/controllers in a `Sinatra::Base` class to keep
things simple. Was doing this because I thought I needed to in order to
be able to tell Capybara where the application was but looking at the
Sinatra testing page (http://www.sinatrarb.com/testing.html), they
provide an example for Capybara that details this
`Sinatra::Application.new` call that I can make instead. This frees us
up to use the simplified application definition.
</pre>
</div>
</content>
</entry>
<entry>
<title>test_helper: Set `RACK_ENV` = 'test'</title>
<updated>2015-12-08T05:23:36+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2015-12-08T05:23:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/Ruby-Web-Sessions-Exercise/commit/?id=f2950ce4afa0cf07f2f23a82805e20ab5857db63'/>
<id>f2950ce4afa0cf07f2f23a82805e20ab5857db63</id>
<content type='text'>
Saw this on the Sinatra testing page
(http://www.sinatrarb.com/testing.html). Seems like I should put it in
to be a good Rack citizen.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Saw this on the Sinatra testing page
(http://www.sinatrarb.com/testing.html). Seems like I should put it in
to be a good Rack citizen.
</pre>
</div>
</content>
</entry>
</feed>
