app/controllers/sessions_controller.rb
# Be sure to include AuthenticationSystem in Application Controller instead
Be sure to include AuthenticationSystem in Application Controller instead
Be sure to include AuthenticationSystem in Application Controller instead
def open_id_authentication(openid_url)
        authenticate_with_open_id(openid_url, :required => [:nickname, :email]) do |result, identity_url, registration|
            if result.successful?
                @user = User.find_or_initialize_by_identity_url(identity_url)
                if @user.new_record?
                    @user.login = registration['nickname']
                    @user.email = registration['email']
                    @user.save(false)
                end
                successful_login(@user)
            else
                failed_login result.message
            end
        end
    end
def open_id_authentication ( openid_url ) authenticate_with_open_id ( openid_url , :required => [ :nickname , :email ] ) do | result , identity_url , registration | if result . successful? @user = User . find_or_initialize_by_identity_url ( identity_url ) if @user . new_record? @user . login = registration [ 'nickname' ] @user . email = registration [ 'email' ] @user . save ( false ) end successful_login ( @user ) else failed_login result . message end end end
Be sure to include AuthenticationSystem in Application Controller instead
Be sure to include AuthenticationSystem in Application Controller instead
openid_url
<not_specific>