basic-authentication

How can I get browser authentication popup?

↘锁芯ラ 提交于 2019-12-05 12:05:53
问题 Can anyone tell me, how can I get this browser authentication window ? 回答1: This popup is part of the HTTP-Authentication. In order to get it, you need to enable it in your web server. As Wikipedia puts it: When the server wants the user agent to authenticate itself towards the server, it can send a request for authentication. This request should be sent using the HTTP 401 Not Authorized response code containing a WWW-Authenticate HTTP header. The WWW-Authenticate header for basic

Cannot Basic Auth from React App with Axios or SuperAgent

混江龙づ霸主 提交于 2019-12-05 10:45:29
I try to make a GET request with axios and I always get 401. This happens only when I send the request from my react app. axios.get('http://localhost:8080/vehicles', { withCredentials: true, auth: { username: 'admin', password: 'admin' }, headers: { 'Accept': 'application/json', 'Content-Type': 'application/json', }, }) Postman GET request with the same credentials and Basic Auth set, works. If I simply type in my browser the url, a login box appears and with the same credentials, it works, I get what I want. I tried with SuperAgent too: Request.get("http://localhost:8080/vehicles")

.htaccess, mod_rewrite, and basic authentication

 ̄綄美尐妖づ 提交于 2019-12-05 08:59:50
I am working on a Wordpress site, and my pages are using a permalink structure that mod_rewrites them to look like directories. For a few pages I want to use Basic Authentication to password protect a few of the pages. How would I write this in my .htaccess file? Am I protecting the file, or the rewritten address? You won't need mod_rewrite for this, hopefully, this should do the trick: SetEnvIfNoCase Request_URI ^/some/path/to/protect require_auth=true SetEnvIfNoCase Request_URI ^/another/protected/path require_auth=true # Auth stuff AuthUserFile /var/www/htpasswd AuthName "Password Protected

Basic Authentication via Angular, why is this throwing error 401

青春壹個敷衍的年華 提交于 2019-12-05 07:14:32
问题 I have an Angular application that I'm trying to authenticate with Basic authentication to my REST service. I'm adding the authorization header with the corresponding "Base {username:password}" encoded in base64 and I'm calling my rest api but keep getting back a 401. I'm obviously missing a step here... Here's the angular code: angular .module('myApp.services') .factory('AuthenticationService', ['$http', '$q', '$location', 'Base64', 'SessionService', function ($http, $q, $location, encoder,

Logout from http_basic auth in Symfony2

瘦欲@ 提交于 2019-12-05 06:40:53
Whenever I go to /admin/logout , I'm correctly redirected to the root of my project but still logged in when I visit /admin/ as I'm not prompted for credentials. Here is my configuration: security.yml security: firewalls: admin_area: pattern: ^/admin http_basic: ~ stateless: true switch_user: { role: ROLE_SUPER_ADMIN, parameter: _want_to_be_this_user } logout: { path: /admin/logout, target: / } AdminBundle/Resources/config/routing.yml logout: pattern: /logout app/config/routing.yml admin: resource: "@AdminBundle/Resources/config/routing.yml" prefix: /admin The authorization is still in place

WCF Service configuration HTTPS with CustomBinding

浪尽此生 提交于 2019-12-05 05:53:14
I needed a custombinding on a WCF Service to allow me to pass raw content to WCFRest service. Works great, but I can't get it to accept transport level security. I want https and basicauthentication as I use elsewhere. Endpoint looks like this: <endpoint address="" behaviorConfiguration="web" contract="SmsService.ISmsReceive" binding="customBinding" bindingConfiguration="RawReceiveCapable"></endpoint> customBinding looks like this: <customBinding> <binding name="RawReceiveCapable"> <security mode="Transport"> <transport clientCredentialType="Basic"/> </security> <webMessageEncoding

Basic Authentication with Resteasy client

∥☆過路亽.° 提交于 2019-12-05 05:39:52
I'm trying to perform an basic auth to the login-module which runs on my jboss using REST. I already found an StackOverflow topic which explains how to authenticate with credentials. RESTEasy client framework authentication credentials This does not work. Analysing the established connection with Wireshark I was not able to see an HTTP package with Authorization: Basic. After more research I found this article, http://docs.jboss.org/resteasy/docs/2.3.3.Final/userguide/html/RESTEasy_Client_Framework.html which describes how to append basic auth to ApacheHttpClient4Executor from resteasy. //

Spring security, either http basic or form login authentication

喜你入骨 提交于 2019-12-05 02:31:00
问题 I have a web app developed using spring mvc and spring security 3.2. I want my app using http basic authentication for restful service and form login authentication for other part. Below is my security configuration: <http pattern="/services/**" create-session="stateless" use-expressions="true"> <intercept-url pattern="/**" access="hasRole('ROLE_REMOTE,ROLE_USER')"/> <http-basic /> </http> <http auto-config="true" use-expressions="true"> <intercept-url pattern="/static/**" access="permitAll"

What is base64 clear text username and password?

淺唱寂寞╮ 提交于 2019-12-05 02:08:53
问题 Recently I came across this word in a basic authentication article. What it meant by base64 clear text usrname and password on the network? Thanks 回答1: It means encoding the username and password using base 64. The result won't look too much like your username and password but it's pretty easy to reverse the operation to get the plain text. See here for details on base 64 encoding http://en.wikipedia.org/wiki/Base64 For example the string password encoded in base 64 is cGFzc3dvcmQ= This

spring-boot setup basic auth on a single web app path?

女生的网名这么多〃 提交于 2019-12-05 01:44:11
问题 I am trying to setup a single path (/basic) in my spring-boot spring MVC based application to be basic auth protected. I am just going to configure this using my own custom configuration parameters so the username and password are simply "admin" and "admin". This currently works for the /basic path (I am prompted and can login correctly). The problem is that logout does not work (and I am not sure why) and also other paths (like /other shown) are being asked for basic auth credentials (before