You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
Welcome to the first edition of our Soup to Nuts series where we tackle a Rails and/or Android problem that we’ve faced (and if we’ve faced it, you or someone else will face it (I hope)). Not sure if you can nest parenthetical statements, but that just happened. Right. Anyway, in this edition, we will…wait, let me give some background on the problem. Background Building a mobile app presented us w
This post will show you how to implement a simple token based authentication schema for a Rails 3 application. The implementation uses Devise(https://github.com/plataformatec/devise) with the token_authenticable module enabled. Show me the code: https://github.com/matteomelani/Auth-Token-Service-Prototype The Problem Let’s say you have a nice Rails 3 web application that uses Devise for authentica
19 Jan 2012 The One With a JSON API Login Using Devise The situation: You need to add an iOS app to your Rails application. Users can login to both locations, and you’re using Devise for authentication. The problem: How do you authenticate users on the iPhone using an email/password created on the website? And how do you tell Devise not to redirect to a login page when you’re using a JSON API?
今回の記事はRails3には多分関係ないお話になるでござる。 デフォでJSONでのログイン対応しているみたいだから。 前回の記事 でJSONを使ってやりとりするのは試してみたけど そもそもそれに使うauth_tokenを script/console(Rails3なら rails console かな?)から取得するというズルをしていたので、 今度はログイン時にauth_tokenを取得できるようにしてやろうという目論見。 なんだけどdevise-1.0.11はデフォルトではJSONやXMLを使ってのやりとりに対応してない。 $ rake routes|grep sign new_user_session GET /accounts/sign_in {:action=>"new", :controller=>"sessions"} user_session POST /accounts/s
今作ってるやつに対してブラウザ以外からアクセスする方法を調べてたのでメモ。 今作ってるやつはRails2なんだけどもdeviseを使ってるから多分Rails3でも同じ感じでできる。 今回はRESTっぽくしたかったのでauthentication_tokenを使う形でやってみました。 まず、Userモデルがそれに対応してなかったので deviseのオプション?の token_authenticatable ってやつをつけてみる。 ってことで devise :registerable, :database_authenticatable, :recoverable, :rememberable, :trackable, :validatable を devise :registerable, :database_authenticatable, :recoverable, :remembera
I am trying to build a rails API for an iphone app. Devise works fine for logins through the web interface but I need to be able to create and destroy sessions using REST API and I want to use JSON instead of having to do a POST on the sessions controller and having to parse the HTML and deal with a redirect. I thought I could do something like this: class Api::V1::SessionsController < Devise::Ses
Devise 2.0 is actually a small release aimed mainly to clean up Devise source code. With time, Devise added new behaviors but, since we had to maintain backwards compatibility, we could not deprecate the old behaviors. Devise 2.0 finally deprecates such old behaviors. The difficulty to migrate to Devise 2.0 will depend on when you started developing your application. If you started a long time ago
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く