gem install hatenaapiauth require 'hatena/api/auth' class AccountController < ApplicationController HATENA_PARAMS = {:api_key=>"...", :secret=>"..."} def hatena_auth Hatena::API::Auth.new(HATENA_PARAMS) end helper_method :hatena_auth def index redirect_to :action=>"login" end def login end def hatena_callback hatena_user = hatena_auth.login(@params[:cert]) render_text hatena_user.inspect end end <