Hey, folks, welcome to Week in Review (WiR), TechCrunch’s regular newsletter covering the past week in happenings around the tech sphere. Winter’s finally arrived, judging by the NYC weath
![TechCrunch](https://cdn-ak-scissors.b.st-hatena.com/image/square/92584d6251feb0822f349cf0211361b2833c9939/height=288;version=1;width=512/https%3A%2F%2Ftechcrunch.com%2Fwp-content%2Fuploads%2F2018%2F04%2Ftc-logo-2018-square-reverse2x.png)
前提 Rails の話 下記のような2組の ID/PW ペアが存在するとする user1 / pass1 user2 / pass2 やりたいこと あるアクションに対して、 user1 または user2 だけがアクセスできるような BASIC 認証をかけたい 結論 以下のように実装すればよい。 class FooController < ApplicationController before_action :multiple_authenticate def index end protected def multiple_authenticate authenticate_or_request_with_http_basic do |username, password| ( ActiveSupport::SecurityUtils.secure_compare(username,
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く