Railsでブログを設定しようとしていて、Enki www.Enkiblog.comが本当に好きです。しかし、私はOpen Idで使用する認証システムについて少し混乱しています。開発では、それはあなたが認証をバイパスすることができますが、生産のために、私がそれを単純な認証システムを組み込むことを望んだが、それは簡単ですかどうかを知りませんOpenIDサーバ Rails:Enkiと他のログインを使用するブログの宝物
を使用する必要のようです(私は騒ぎです)、OpenIdサーバーをセットアップする方法を知りたいのであれば(インストールがもっと必要です)
私はMasqueradeと呼ばれるOpen Idサーバーを見ましたが、まったく混乱しました。私はそれがEnki(Railsエンジンのような)に組み込まれようとしているのか、まったく別のアプリケーションであるのかは分かりません。
どのようにすれば認証を簡単にすることができますか、それともどのようにして簡単にしてnoobが使用できるようにすることができますか?
この
はエンキにOpenID認証のために設定しenki.ymlファイルです# Configuration options for your blog - customise to taste
# This file contains no secret information, so can be stored in source control (unlike database.yml)
title: My Enki Blog
url: http://enkiblog.com
author:
name: Don Alias # For copyright notice and ATOM feeds
email: [email protected] # Exception emails will go here, and it is used in ATOM feeds
open_id: # These are used to login to the admin area
- http://enkiblog.com
- http://secondaryopenid.com
# Delete the following section if your site will not be acting as an OpenID delegate (http://wiki.openid.net/Delegation)
# If you're deploying with mongrel, make sure you read http://rhnh.net/2008/04/13/nginx-openid-delegation-and-yadis
open_id_delegation:
server: http://www.myopenid.com/server
delegate: http://username.myopenid.com
これで
def create
return successful_login if allow_login_bypass? && params[:bypass_login]
if params[:openid_url].blank? && !request.env[Rack::OpenID::RESPONSE]
flash.now[:error] = "You must provide an OpenID URL"
render :action => 'new'
else
authenticate_with_open_id(params[:openid_url]) do |result, identity_url|
if result.successful?
if enki_config.author_open_ids.include?(URI.parse(identity_url))
return successful_login
else
flash.now[:error] = "You are not authorized"
end
else
flash.now[:error] = result.message
end
render :action => 'new'
end
end
end
同じ問題が発生しています。私は正常にmyopenid.comにサインアップし、それに満足しており、それに固執したいと思います。私は解決策が最終的に見つけられることを願う。 –
これは私の問題を解決しました:http://stackoverflow.com/questions/2683611/open-id-authentication-openidauthentication-store-is-nil-using-in-memory-sto –