similar to: HTTP Auth 401 Even on Valid Login

Displaying 20 results from an estimated 200 matches similar to: "HTTP Auth 401 Even on Valid Login"

2011 Jul 14
0
subclasses with inherited_resources?
I''m trying out inherited_resources and so far so good. However, one problem I''ve run into is that it''s very difficult to customize inherited_resource behaviour in subclasses. Looking through the source I see it uses things like undef_method and class_attribute. For example, if I have the following controllers: class ItemsController inherit_resources actions :new,
2007 Dec 09
2
Questions about rails 2.0
Hi, i''ve found some questions on the rails blog which haven''t any answer. Because i''m interested too i paste them here: # gonzo on 07 Dec 22:10: Does CSRF protection work with forms that are fully cached? # rugal on 08 Dec 20:14: Great job guys! Just an information about migrations. will t.timestamps create both created_at and updated_at? And for _on ?
2007 Sep 18
2
rSpec / Nested Routes / Mocks
I''m having a terrible time trying to test a nested route with rSpec. I can''t seem to tell rSpec to expect the call @item.user. The following error message plagues me not matter how I try to fuss with the mock: Spec::Mocks::MockExpectationError in ''ItemsController handling POST / items should redirect to the new course on successful save'' Mock
2006 Aug 24
2
Design questions on creating digg.com-like URLs (are they considered RESTful?)
Hi everyone, I''m working on creating a site that functions similar to digg.com (please no "no more digg clones" remarks please! :) ). One thing I really like about digg is there URLs are very nice to read and I would like to emulate that without having a lot of actions spread out all over my application. So in my app I have three main resources: Users, Tags, and Items
2007 Mar 21
0
Getting the module name with ObjectSpace...
Hey :) I''m trying to create a method for making a sitemap dynamically. It works great for flat sites where you simply have your controllers in the app/controllers directory. In this case, I can extract the controller names like, @controllers ObjectSpace.subclasses_of(ActionController::Base).each do |obj| @controllers["#{obj.controller_name}"] = obj end However,
2009 Apr 19
1
Cucmber: Mysql::Error: query: not connected: ROLLBACK
Hi, I ran in trouble with unexpected rollbacks using cucumber 0.3.0. My feature-file looks like Scenario: Create Valid Item Given I start and the step is Given /^I start$/ do get "/items" end In my log/test.log I get SQL (0.2ms) SET NAMES ''utf8'' SQL (0.2ms) SET SQL_AUTO_IS_NULL=0 SQL (0.1ms) BEGIN Processing ItemsController#index
2007 Oct 26
3
Specing with Subdomains as Account Keys
How do you go about implementing and rspecing subdomains as account keys? I''m sure that this must be an issues for others as well. So I have an app using subdomains as account keys. The Application Controller sets up @current_company in a before filter. Everything is done within the context of the @current_company. After reading about Demeter''s Revenge
2008 Oct 03
1
fragment caching with search box
I''m trying to setup some fragment caching which works fine for the index but i''m not sure how to ignore the caching if they are searching the index results. my code in short: ItemsController def index @items = Item.search(params[:search], params[:min_rank], params[:max_rank], params[:classification_id], ...) end index.html.erb <% cache (''items'',
2010 Jul 08
4
testing authentication with basic_auth
hi, I''ve got an api which is using authenticate_or_request_with_http_basic What are you guys using to test this? I''m using rspec, and before I was using rspec-rails, I was using authorize from Rack::Test to do the authentication. However, authorize clearly doesn''t work when using rspec-rails, so I''m wondering what everyone else is doing? -- You received this
2008 Nov 01
0
How to expire HTTP basic authenticated session?
Greetings all, I am using authenticate_or_request_with_http_basic, but how can I expire/forget the successfully authenticated session for a specific client? Thanks in advance. Cheers, Difei -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk"
2011 Aug 21
0
basic http authentication
Hi, I used code from http://railscasts.com/episodes/82-http-basic-authentication but added it to Application controller to apply to the whole application class ApplicationController < ActionController::Base protect_from_forgery before_filter :authenticate protected def authenticate puts ''authenticating.. '' authenticate_or_request_with_http_basic do |username,
2008 Jan 15
0
HTTP Digest Authentication
I just started using authenticate_or_request_with_http_basic. Is anyone working on the digest version of that? (I realize it may get a little complicated with the handshaking) If not, I wouldn''t mind contributing it. (I''ve implemented it in the past for other servers) -brian --~--~---------~--~----~------------~-------~--~----~ You received this message because you are
2009 Jan 13
0
optional authentication and HTTP Basic
Hi all, I have an app that originally only supported form-based authentication, and showed pared-down content to unauthenticated users. I then layered on HTTP Basic authentication using authenticate_with_http_basic, which worked fine for scripts like LWP/ wget/curl. However, some web browsers refuse to submit credentials in the URL (eg.
2011 May 09
0
rails guides - getting started - section 10 security
The example doesn''t work as described for me; not sure if I haven''t followed it right, or there''s a problem with the code. Can someone help me to determine what the problem is. Specifically, after adding the authentication code to the PostsController, with this line: before_filter :authenticate, :except => [:index, :show] The guide says that "we want the user
2006 Apr 05
1
select in *.rhtml
I''m trying to get a select box of categories to appear in my items views after I created everything using generate scaffold, but I can''t get the categories to appear in my forms. class ItemsController < ApplicationController def new @item = Item.new @category = Category.find_all end ... class Item < ActiveRecord::Base belongs_to :category end class
2008 May 08
0
Controller/action not working in url
Hey guys, i am facing some problems in calling an action. see details: in sale_items controller, i have a function def saleedit --code-- render ( :action => ''saleedit'') end and i have a file in view/sale_items/saleedit.html.erb. okay. now i have one more view view/sale_items/new.html.erb. in this file i have a form like this: <% form_tag url_for(:action =>
2009 Aug 07
2
paperclip model fails while when updating with no attachment
Hi all, I have paperclip running in my rails environment. I setup a new model just for paperclip called Assets so that I could upload multiple files per item (even though I''m only using 1 attachment per item at the moment). Everything works except for the following: Updating an item record with no attachment in the form but having PREVIOUSLY attached an asset while creating or updating.
2006 Apr 04
2
HABTM
Hi. Im new to Ruby and new to Ruby on Rails and have problems realizing a =20= simple many_to_many relationship: My tables: items <-> items_users <-> users ------------------------------------------------------------------------=20= -------------------------------------- id user_id = id name item_id name ... = password = ...... My Code: class
2013 Mar 20
2
Rspec + Devise + BaseController
Hello there, I''m creating a base controller for the admin section of a project. All controllers whitin the admin section will inherit from it. ##################################################### #app/controllers/admins/base_controller.rb class Admins::BaseController < ApplicationController layout "admin_cms" before_filter :authenticate_admin! end
2009 Feb 02
9
ActiveRecord Unexplainable SystemStackError - Only in WEBrick
This SystemStackError is driving me crazy. It only takes place when testing with WEBrick - I can''t reproduce it with any tests. It is caused by calling the "missing" id method (base.rb:2435) on my ActiveRecord class. WEBrick and my tests are running as the same user, with a `ulimit -s` of 10240. Plus the query works sometimes so I don''t think this matters.