Questions tagged [http-auth]

Node.js package for HTTP basic and digest access authentication.

Node.js package for HTTP basic and digest access authentication.

Related links

20 questions
10
votes
3 answers

Using HTTP basic auth for certain URLs only with Express framework

I have a node.js application designed using the Express framework and the http-auth module, as follows: var auth = require('http-auth'); var express = require('express'); // ... var mywebapp = express(); // ... if (usebasicauth) { var basic =…
user2064000
4
votes
1 answer

NGINX How to make HTTP Basic Auth pages Gzip enable

Here are my gzip setttings: ## # Gzip Settings ## gzip on; gzip_vary on; gzip_proxied any; gzip_comp_level 5; # Don't compress anything under 256 bytes gzip_min_length 256; # gzip_buffers 16 8k; gzip_http_version 1.1; …
Mitesh Shah
  • 121
  • 9
3
votes
2 answers

Redirect after Basic Http Auth Express.js

I want to make a private access to an application using express.js like .htaccess and .htpasswd do in my php project. I'm using http-auth Here is my code : app.get('/', function(req, res) { basic.apply(req, res, function(username) { …
Jérôme
  • 1,060
  • 1
  • 7
  • 18
2
votes
1 answer

Python mechanize implementation of HTTP Basic Auth

I could get HTTP Basic Authentication to work using requests: import requests request = requests.post(url, auth=(user, pass), data={'a':'whatever'}) And also using urllib2 and urllib: import urllib2, urllib passman =…
Hadus
  • 1,551
  • 11
  • 22
2
votes
1 answer

Why http-auth does not work with express.static middleware?

I'm trying to setup a simple auth using http-auth module. I've created this setup but it's not working properly. The dialog prompting the user/pass show up but if I close the dialog the app continues to work, that is, the auth don't seem to be…
Osny Netto
  • 562
  • 3
  • 9
  • 28
2
votes
3 answers

How to use http-auth with Sails

I have deployed my Sails app to a PaaS, and I'd like to have simple password protect so that no one can access my staging server. What's the simplest way to do that? Looks like http-auth, the doc explains how to implement for ExpressJS, but with…
zabumba
  • 12,172
  • 16
  • 72
  • 129
1
vote
0 answers

PHP Auth User/Pw Return null if set in URL?

I am trying to validate HTTP basic auth using PHP. I read https://www.php.net/manual/en/features.http-auth.php When I try to validate PHP_AUTH_USER and PHP_AUTH_PW I noticed something odd. If I include the credentials in the url such as…
user738974
  • 11
  • 2
1
vote
0 answers

http-auth unauthorized post requests

I have a website (example.com) with a front page (example.com/index.html) which display information taken from database. To manage database there is a subdomain (example.com/back). I want to protect this subdomain with an athentification. I'm using…
1
vote
1 answer

http-auth digest using express js

I'm developing an API in Express JS. I want to use http-auth library and I've been trying to use digest authentication, but I have not been able to use it. Here is my code: var app = require('express')(), routes =…
1
vote
1 answer

htaccess: mod_rewrite with http auth in a subfolder gives a 404

I have a strange problem with a site I'm working on, it really drives me crazy, although it should just be working. I have a site at domain.nl, and a CMS at domain.nl/cms. All request except images, css etc and the /cms folder, are redirected to…
DavidKunz
  • 325
  • 3
  • 8
1
vote
0 answers

Nginx, put HTTP AUTH login to header

How to put HTTP AUTH login to header ? Something like: auth_basic "Restricted"; auth_basic_user_file /etc/nginx/.htpasswd; proxy_set_header Username $Login_here; any ideas ?
Denis
  • 81
  • 2
  • 7
1
vote
2 answers

node.js Express with HTTP-AUTH

I have problem with creating node.js application based on express with http-auth module. It's a possible create Middleware for this http-auth library I have this code: //Configure Middlewares logger.configure(function() { //All output has…
0
votes
0 answers

How can I implement HTTP authentication in Ruby on Rails, but only for external IP addresses?

How to use http auth in ruby on rails? i hope only external ip need to do that. for example, my internal ip is "192.168.1.0/24". class ApplicationController < ActionController::Base USER_ID, PASSWORD = "hello", "Passw0rd#" before_action…
Patrick Su
  • 11
  • 3
0
votes
1 answer

Supabase API, is basic authorization an option

I'm new to Supabase, but it looks very nice and promising for many future projects. In this case I'm trying to use it to store web hook requests from another system - this system, however, only supports sending web hook requests with Basic…
Aidal
  • 799
  • 4
  • 8
  • 33
0
votes
0 answers

How to enable http auth on specific API route only in Nodejs?

My api uses auth to grant access to endpoints to my main app with a basic token. app.use(auth.connect(basic)) Hence, all endpoint use auth. I need to write files on the api server that are publicly available. How can I make it so the URL of the…
Pm Rivière
  • 191
  • 2
  • 13
1
2