ユーザーのログインとパスワードが正しく送信された後にユーザー情報を取得できる基本的な API を構築しています。
現在、私は次のようなものを使用しています:
http://foo:bar@example.com/api/user.xml
したがって、私がする必要があるのは、リクエストで送信されたユーザー/パスワード (foo
およびbar
) にアクセスすることですが、Rails コントローラーでその情報にアクセスする方法がわかりません。
Then I'd check those variables via a quick User.find
and then set those as the username and password variables for authenticate_or_request_with_http_basic
.
It's possible I'm looking at this at the completely wrong way, but that's where I'm at right now. :)