Questions tagged [basic-authentication]

Basic authentication represents a secure technique allowing a web browser or any client program to furnish a unique user name and password while initiating a request.

What is the reason behind the browser not reusing the authorization headers following an authenticated XMLHttpRequest?

As I work on developing a Single Page Application using Angular, I have encountered an interesting challenge. The backend system exposes REST services that require Basic authentication. Surprisingly, while obtaining index.html or any of the scripts does no ...

AngularJS Basic Authentication with 'Access-Control-Allow-Origin'

function loginSuccessFn(data, status, headers, config) { Authentication.setAuthenticatedAccount(data.data); //window.location = '/'; return $http.post('https://ap-codereview.us.oracle.com/api/json/accounts/login', { ...

Having trouble executing Token-based authentication-passport code in NodeJS and ExpressJS

app.js const express = require('express'); const path = require('path'); const logger = require('morgan'); const app = express(); // view engine setup app.set('views', path.join(__dirname, 'views')); app.set('view engine', 'jade'); app.use(logger('dev') ...

Using Webdriverio and Selenium to implement Basic Authentication within Safari

I have been conducting experiments with a cloud computing service provider named LambdaTest for running Selenium and Appium tests while utilizing webdriverio. All of the company's websites utilize Basic Auth, and it seems like this method will remain ...

Learn how to implement Basic Authentication in your Express application using the express-basic-auth package. You can easily trigger login and logout

When it comes to logging out a user who has logged in using basic Auth, I am exploring different options by consulting various sources like: link1 link2 In my application, I have implemented express-basic-auth to secure certain routes. Here is an example ...

Guide to implementing basic authentication within an HTTP request in Angular 4

I'm new to this and I only have experience with the http post method. I need to send the username and password as base authentication for every API request. onSubmit = function(userdata){ this.tokenkey = localStorage.getItem('logintoken'); console. ...

Java Spark API using basic authentication will issue a 401 error response when accessed from an Angular application

My Java Spark API is set up for basic authentication. When I make a call to the URL from Postman with basic auth, it returns a JSON response. However, when I make the same call from an Angular 4 application, I get the error message: "Response for preflight ...

Jquery Ajax Request

My goal is to create an Ajax call with the following specifications: $.ajax({ type: "GET", dataType: "json", contentType: "application/json", username: "user123", password: "admin123", url: "http://localhos ...

Steps for logging out of basicAuth in Express

I am in the process of setting up a web server with express. In order to access this server, users must authenticate using the basicAuth() middleware provided by Express. Everything is working perfectly, but I am having trouble figuring out how to log out ...

Is there an issue with HTTP Basic Authentication through the URL in Firefox?

Typically, you can access sites requiring HTTP basic authentication using Selenium by including the username and password in the URL like this: selenium.open("http://myusername:<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="20 ...

When the Fetch response displays a 401 Unauthenticated error, it typically indicates an issue with authentication in a React frontend

For a university assignment, I developed a Spring Boot backend that requires authorization/authentication. The API functions correctly when tested standalone through Postman requests with the correct authentication/authorization. However, when attempting t ...

Incorporating a protected Grafana dashboard into a web application

I am looking to incorporate Grafana into my web application using AngularJS. The main objective is to allow users to access the Grafana UI by clicking on a button within my application. Setting up an apache reverse proxy for Grafana and ensuring proper COR ...

Performing an HTTP POST request with authentication credentials

Every time I try this: curl https://example.com/my/ressource -H "Content-Type: application/json" --data '{"itemid":["123","456"]}' -u myuser An HTTP 403 Forbidden error pops up. However, if I stick to a get request like this: curl https://ex ...