Skip to main content

All Questions

Filter by
Sorted by
Tagged with
0 votes
2 answers
1k views

How to change HTTP Basic Authentication form?

For HTTP Basic Authentication I need a custom form which has fields like site block and site password instead of username and password. I just want the text to be changed from username to site block ...
Akanksha's user avatar
0 votes
1 answer
449 views

POST Authorization trouble: no implicit conversion of nil into String

Sometimes when I run tests I am getting this error: TypeError: no implicit conversion of nil into String, which is caused by this code: params = { ..... } auth_headers = { 'Authorization': "...
Garbus Uchiha's user avatar
0 votes
1 answer
801 views

Ruby on rails: how to exclude certain path from rack middleware authentication?

I am trying to use rack middleware authentication. I want to exclude certain path from the authentication. Is it possible to exclude some specific path? This will authenticate all the routes starts ...
Praful Patel's user avatar
0 votes
2 answers
673 views

Rails basic authentication with cutomized JSON failure message

I have got a Rails 5.2 app in API mode. If a request is supplied with correct Basic Authentication credentials, expected JSON data { status: true, data: 'test_user_data' } will be rendered. ...
Hiro Shaw's user avatar
  • 395
7 votes
1 answer
4k views

How to test or bypass Basic Auth in Rails 5 testing of controllers

I would like to test controllers in Rails 5 for which Basic Authentication is activated. The way explained in the current official instruction (as of 2018-10-14) does not work for some reason. The Q&...
Masa Sakano's user avatar
  • 2,287
0 votes
1 answer
411 views

Oauth client with a Doorkeeper provider behind basic authentication

We are setting up a Doorkeeper provider on our main app to enable Oauth2 authentication on some side applications. Everything's working fine on our production environement. On the staging environment ...
demental's user avatar
  • 1,494
8 votes
1 answer
4k views

Ruby on Rails: can I use http basic auth in constraints?

I use Rails 5 API mode routes.rb: Rails.application.routes.draw do constraints Basic do mount Rswag::Ui::Engine => '/api-docs' mount Rswag::Api::Engine => '/api-docs' ...
Eugene Yak's user avatar
3 votes
4 answers
7k views

How to access the page protected by basic auth using Faraday?

I have a php page I want to access and that page is protected by basic auth. I know the url and username/password, they are listed below in code: url = 'https://henry.php' # note that it is a php ...
Henry Yang's user avatar
  • 2,643
3 votes
2 answers
1k views

HTTP Basic Authentication in PayPal Webhook URLs

(Added: For this question, assume operations on the PayPal API are working and authenticated.) Do PayPal Webhooks support URLs with HTTP Basic authentication credentials, so the following would ...
Eliot Sykes's user avatar
  • 10.2k
0 votes
1 answer
254 views

How do I prevent devise from storing sessions when basic auth is used?

Disclaimer: I am a relatively novice RoR developer. My rails 4 web app supports a RESTful API. I am using devise, and the API authenticates with basic auth without any use of keys/tokens (so basic ...
tstrass's user avatar
  • 86
0 votes
1 answer
801 views

Ruby On Rails authentication issue with http basic(the authentication process is triggered twice for every request)

This is the request I send to the rails controller: function login(){ $.ajax({ type: 'GET', url: '/api/myapi/show', username: 'username', password: 'password', contentType: "...
user3494179's user avatar
8 votes
0 answers
3k views

Ruby open "userinfo not supported": URL with basic auth

I have a lot of URLs in the following format ftp://user:[email protected]/some_image.jpg https://user:[email protected]/some_image.jpg When I try to load the image with ruby's open method, it throws the ...
23tux's user avatar
  • 14.8k
1 vote
1 answer
3k views

HTTP Basic Authentication as default in Ruby HTTP

Using Ruby 2.2.3 I'm looking for a way to use HTTP Basic Authentication for every request. I know it is possible to define basic_auth per request: http = Net::HTTP.new(uri.host, uri.port) request = ...
Robert Strauch's user avatar
0 votes
1 answer
255 views

Avoiding basic auth with Selenium (using Ruby)

Well, the code is basically d = Selenium::WebDriver.for :firefox, :profile => "myApp" d.get("http://login:[email protected]") And still firefox shows basic auth dialog window. I use the profile ...
Stepan Salin's user avatar
1 vote
1 answer
223 views

how to save HTTP_Basic_Authenticate parameters to a user model

I have a basic application that I want user to be able to access only if they have an access_token I have given them. In this example lets say the token is '131313' Users without the access_token can ...
coderwannabe2's user avatar

15 30 50 per page