Questions tagged [basic-authentication]

Basic authentication is a method for a web browser or other client program to provide a user name and password when making a request.

Basic authentication was introduced with RFC1945 (HTTP/1.0) and is historically the first mechanism for authenticating at the HTTP layer level. Relying on base64 encoding, it is considered from the beginning as weak and unsecure, but it has a legitimate use on trusted connections (either on encrypted tunnels such as SSL, or unencrypted on a closed network).

Mechanism description :

When challenged by an HTTP server sending a WWW-Authenticate header with a realm challenge, the HTTP client must send a new request including an Authorization header containing the user's credentials encoded in base64.

The user credentials can be stored on the HTTP server itself, or on a remote system such as LDAP.

3320 questions
1
vote
2 answers

401 error using HTTP basic auth with Axios in Vuejs

I'm working on a Vuejs app that gets its data from an Apache Solr index, and I have had my app working with the index using Axios to make the connection. However, HTTP basic authentication has been added, and I am unable to get authentication to…
wonder95
  • 3,825
  • 8
  • 45
  • 74
1
vote
1 answer

Cors is not working in apache on heroku

I deployed the php application with Apache with basic authentication enabled. When accessing from local with ajax, the following error occurs. Failed to load https://(myapp).herokuapp.com/api.php?mode=xxx: Response to preflight request doesn't pass…
Yuwaz
  • 383
  • 1
  • 4
  • 19
1
vote
1 answer

Python - Receiving Response 401 when working with Redtail API

I'm new to working with APIs and I keep receiving a 'response 401' when trying to connect to the Redtail API. Here is a bit of documentation on Redtail: https://help.redtailtechnology.com/hc/en-us/articles/203964430-Authentication-Methods- And here…
Ethan Koch
  • 25
  • 5
1
vote
1 answer

Gorilla mux, middleware for static fileserver

Please see my code below. As you can see it's a simple service with two endpoints: /test <-- basic auth protected using middleware /static <-- serves all the files in the ./static directory Now I'm trying to add the basic authentication middleware…
Rogier Lommers
  • 2,263
  • 3
  • 24
  • 38
1
vote
2 answers

Undefined response from login request after upgrading from Http (ng2) to HttpClient (ng6)

I can't seem to access the response to my login request after upgrading from Angular's Http to HttpClient. This is the working code for Http: login(username: string, password: string): Observable { let headers: Headers = new…
Joakim
  • 2,092
  • 1
  • 20
  • 23
1
vote
1 answer

How do i get this Basic Authentication working in .NET Core

I am using Basic Authentication and I have created a Middleware for this. When I use the Authorize attribute and try to make an API call through Postman, i get 401 Unauthorize even as I am added the authorization details in Postman. I am not sure if…
1
vote
1 answer

How to show browser login form for basic authentication using RESTEasy

I´m currently messing around with JAX-RS specifically Resteasy, because it "just works" with Wildfly and I don´t have to configure anything. That´s really the only reason I use that. I did already implement Basic Authentication, looking forward to…
Max
  • 1,536
  • 1
  • 14
  • 18
1
vote
1 answer

Return JSON on a WebAPI IHttpModule

I'm using the code below to handle Basic Authorization on my WebAPI project. Its works fine, but i would like to custom the Response returning a JSON data based on a specific class. Is it possible? Example of the class i want to return: public…
1
vote
1 answer

Spring Security BASIC auth - matching password hash

When doing BASIC authentication with Spring Security I want to match password hash and not password itself. For the sake of storing hash and not the password server-side. I have the following code: @EnableWebSecurity @Configuration public class…
Cortlendt
  • 2,190
  • 4
  • 29
  • 50
1
vote
0 answers

POST params stripped .htaccess basic auth

I'm basically trying to send an AJAX-Add-to-Cart-POST-Request by WooCommerce WordPress Plugin. The Plugin does so by sending form-data to a URL that already contains a GET param: jQuery.post('/?wc-ajax=add_to_cart', { product_id: '123', quantity: 1…
mexn
  • 78
  • 2
  • 7
1
vote
0 answers

Secure way to perform basic authorization

I need to perform authorization against tomcat programmatically. The way I'm currently doing it is like that: String username = "tomcat_admin"; char[] password = CryptoUtility.decrypt(System.getenv("TOMCAT_ADMIN_PWD")); URL tomcat = new…
sel
  • 483
  • 5
  • 16
1
vote
0 answers

How to stop React-Native-Windows from asking for HTTP Basic Auth credentials

I'm using React Native with the plugin for the Universal Windows Platform to access remote resources on a REST server. When doing a fetch request for a resource that requires authorization via HTTP Basic Auth, I can provide the request with an…
1
vote
1 answer

React: Implement Login with BASIC Authentication

I want to create a react web app containing a login. My backend is implemented with JAX-RS and BASIC authentication. Here is a snippet of the web.xml and a Resource.
1
vote
0 answers

HTML5

I am developing an app for SmartTV platform webOS by LG. I have to play video with html5 tag. The videos are stored in playlist files (m3u8), so I have links to them. But they are protected by Basic Authentication. I am using a link like…
1
vote
0 answers

.htaccess basic auth with no assigned credentials

I am trying to find out how secure this scenario would be. I have a directory which I do not want anybody to ever be able to access or download the encrypted log files within the directory. I have this directory protected by .htaccess basic…
J---
  • 37
  • 11