Skip to content
This repository has been archived by the owner on Dec 27, 2023. It is now read-only.

Commit

Permalink
Merge pull request #173 from smcgregor/fix-android-issue-65
Browse files Browse the repository at this point in the history
Fix android issue 65
  • Loading branch information
smcgregor committed Feb 26, 2016
2 parents 33b0a20 + c71e5ff commit a13e68a
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 13 deletions.
3 changes: 2 additions & 1 deletion app/controllers/token_authentications_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
# are currently only used by mobile apps.
#
class TokenAuthenticationsController < ApplicationController


skip_before_filter :verify_authenticity_token , :only => [:new, :create]
before_filter :authenticate_user!, :except => [:new, :create]

# == Get the Example TokenAuthentications Form
Expand Down
40 changes: 28 additions & 12 deletions app/views/token_authentications/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,37 @@
New Token Authentication
<% end %>

<h1>html</h1>
<%= form_tag(token_authentications_path, :method => "post") do %>
<p>Email</p><%= email_field_tag "email" %>
<p>Password</p><%= password_field_tag "password" %>
<p></p><%= submit_tag("New Token") %>
<% end %>
<h1>Token Authentications</h1>

<p>
This page is provided to simplify integration
with the content server's token authentications.
If you don't know what that means, then you probably
don't belong here.
</p>

<h2>html</h2>
<form action="/token_authentications" accept-charset="UTF-8" method="post">
<input name="utf8" type="hidden" value="">
<p>Email</p>
<input type="email" name="email" id="email">
<p>Password</p>
<input type="password" name="password" id="password">
<p></p>
<input type="submit" name="commit" value="New Token">
</form>

<br />

<h1>json</h1>
<%= form_tag(token_authentications_path(:format => :json), :method => "post") do %>
<p>Email</p><%= email_field_tag "email" %>
<p>Password</p><%= password_field_tag "password" %>
<p></p><%= submit_tag("New Token") %>
<% end %>
<h2>json</h2>
<form action="/token_authentications.json" accept-charset="UTF-8" method="post">
<p>Email</p>
<input type="email" name="email" id="email">
<p>Password</p>
<input type="password" name="password" id="password">
<p></p>
<input type="submit" name="commit" value="New Token">
</form>

<br />

Expand Down

0 comments on commit a13e68a

Please sign in to comment.