認証を持たないウェブアプリケーションをいざ認証に対応させようと思うと案外面倒でモチベーションを無くしてしまうなんて事もよく起きうる話です。特に社内向けのアプリケーションを作っていたら本番で使う事になってしまって、なんて話は良くある話です。開発で本番 DB を見るのはちょっと...。でも既存のコードをゴリゴリと触りたくない。そんな場合にログイン認証部分だけマイクロサービス化できると気持ちも幾分和らぎます。今日はそんなちょっと便利なサーバ「loginsrv」を紹介したいと思います。 GitHub - tarent/loginsrv: JWT login microservice with plugable backends such as OAuth2, Github, htpasswd, osiam loginsrv is a standalone minimalistic login se
cancan gem (!= CanCam) は、ウェブアプリケーションの「認可」をつかさどるライブラリ。 おもしろWEBサービス開発日記のrailsメモ – 2009-12-15 Rails3.0 で Devise と CanCan を動かす rails cancanを試してみた Rails3でログイン認証(最終回) ロールはcancan 重要なのは、「認証」ではなく「認可」のみを受け持っているということで、要するに権限管理だけを「関心事」として持つライブラリであるということ。したがって、認証側は、 devise でも、 warden + omniauth でも、 Railscast のように authlogic でも、自力実装でも大丈夫だということ。キレイ目でもカジュアルダウンしたときにもコーデに使える万能アイテムのようなものですかね。 認証と認可の違い 当ブログにしては珍しく Rai
このウェブサイトは販売用です! twiwt.org は、あなたがお探しの情報の全ての最新かつ最適なソースです。一般トピックからここから検索できる内容は、twiwt.orgが全てとなります。あなたがお探しの内容が見つかることを願っています!
co-meetingではユーザ管理をDeviseをベースに開発しています。 開発過程でDeviseについて調べたことを、何度かに分けて書いていこうと思います。 Devise(http://rubygems.org/gems/devise)とは、Railsアプリにログインの仕組みを組み込む場合にデファクトスタンダードになっているgemで、メールによるコンファームなど必要な仕組みが揃っていて非常に便利です。*1 Rails3のインストールからプロジェクトの作成、Deviseの使い方については以下のサイトで詳しく解説されています。 http://www.oiax.jp/rails/rails3.html チュートリアル的に習得するならこちらのページの方が参考になります。 ここでは、Deviseの導入から、独自ログインのみのシステムでDeviseを使うに当たって最低限必要と思われる設定についてのみ
Warden はかなり好き(PadrinoというかSinatraでも使えるし)。でも、僕もDeviseはやり過ぎだと思う派だなあ 認証関連の画面遷移やURLが Devise の規約にぴったりハマるケースっていくらなんでも稀だと思うし、カスタマイズするとなると結構ソース追わないといけなくなって結局だるい… env['warden'] に一通り入ってるのは、少しかっこ悪いかもしれないけど便利。 認証とかリダイレクト処理とかガラケー対応とか、はアプリケーション本体ではなくRack Middleware で実現したいな~と言う facebook でこんなことをつぶやいた。 僕は Rack とその関連技術が凄く好きで、もっと勉強する人が増えてほしいと思っているのだが、何で好きなのかとかを整理してみた。 Good Stuff 結合度が低くなる。なので: Rackでとある機能(認証など)を実現すれば、そ
Devise の README は懇切丁寧だが、その分クソ長いので、読むのに疲れる。後続のために訳してみることにした。無保証。OAuth2 の部分は飛ばした。長いし。差し迫ったら訳します。 Devise Devise は Warden をベースにした Rails のためのフレキシブルな認証ソリューションです。 Rackベース Rails エンジンに基づいた完全な MVC ソリューション 1回の認証で複数のロールを持たせることができます あなたが必要な部分だけ使えるモジュラー構造というコンセプトに基づいています 以下の11のモジュールで構成されています: Database Authenticatable ユーザーがサインインする時に認証するためにパスワードをデータベースに暗号化し保存します。この認証は POST リクエストまたはBasic認証を通して行われます。 Token Authenti
READMEを意訳&気になったところを調べてざっくりとまとめました。自分用のメモです。 基本的に ログイン/ログアウトの状態を管理するセッション ユーザモデルへの認証機能の追加 の二つの機能が定義されている。 ログイン/ログアウトの状態を管理するセッション まずは、 class UserSession < Authlogic::Session::Base end のように、Authlogic::Session::Baseを継承させたモデルを作る ログイン方法 モデルみたいに、createやsaveメソッドでログインすることが出来る。 UserSession.create(:login => "bjohnson", :password => "my password", :remember_me => true) session = UserSession.new(:login => "bj
RailsでGoogle Apps for your domainにOpenID認証をするサンプルアプリを作りました。 以下、サンプル作成手順です。 ruby-openidとruby-openid-apps-discoveryをインストール >gem install ruby-openid >gem install ruby-openid-apps-discovery railsアプリを作ります >rails gapps-openid app/controllers/consumer_controller.rbを作成 require 'pathname' require "openid" require 'openid/extensions/ax' require 'openid/store/filesystem' require 'gapps_openid' class Consumer
Linuxで稼動させているApacheにて認証が必要なWebサービスに、Windowsドメイン(Active Directory)の認証情報を使って、シングルサインオンを実現させるまでの手順を備忘録として残しておきます。 今回、ブラウザは、IEとFirefoxにて動作確認を行いました。 Windowsドメインログオンをしているクライアントから、上記2種類のブラウザを使うと、NTLM認証※を利用しているWebサービスには、認証済みのドメインログオンの情報を利用することができ、ユーザ名やパスワードを入力する必要の無いシングルサインオン環境が実現できます。 ※NTLM認証(NT LAN Manager authentication)とは - IT用語辞典 e-Words 前提 今回利用した構成は以下のような感じ。 Webサーバ CentOS 5 Apache 2.2 + mod_auth_ntl
mod_wsgiで運用しているWSGIアプリケーション内からAuthorizationヘッダー(HTTP_AUTHORIZATION)を参照する場合には、mod_wsgiのWSGIPassAuthorizationヘッダーをOnにしておかなくてはならない。デフォルトはOffなので、例えば、Djangoアプリケーションから、 def view(req): auth_header = req.META.get("HTTP_AUTHORIZATION") # do something のようにすると、常にNoneが返ってくる。このような設計になっている理由は、WSGIPassAuthorizationの項に書いてある。WSGIPassAuthorizationディレクティブはHTTP認証ヘッダーがHTTPリクエストに存在するときに、その値をHTTP_AUTHORIZATION変数としてWSGIア
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く