basic-authentication

Apache mod-auth-mysql with phpass encrypted password (Wordpress)

橙三吉。 提交于 2019-12-10 09:37:31
问题 I need to have password protection on some web pages outside of the main Wordpress site. The users would prefer to use the usernames and passwords they already have in the Wordpress. The obvious solution would seem to be to use the Apace module for Mysql based authentication: mod-auth-mysql. This however does not seem to be possible, because Wordpress uses Phpass password encryption, which is not supported by mod-auth-mysql. http://modauthmysql.sourceforge.net/CONFIGURE http://www.openwall

Grails 2.4.3: Consume a REST Service

孤街浪徒 提交于 2019-12-10 03:09:02
问题 How do I consume a RESTful web service in Grails 2.4.3. I also need to use Basic Authentication. You would think there would be an good answer to this question already, but I have really struggled to find one. Many answers point me in the direction of the Grails rest plugin, which I have tried but could not get to work for me. I think I am probably just struggling with the docs and using it wrong. 回答1: I found the REST Client Builder Plugin, which was better documented and worked much better

How to send username:password to unittest's app.get() request?

人走茶凉 提交于 2019-12-10 02:12:04
问题 This is part of my unit test in Flask-RESTful. self.app = application.app.test_client() rv = self.app.get('api/v1.0/{0}'.format(ios_sync_timestamp)) eq_(rv.status_code,200) Within the command line I could use curl to send the username:password to the service: curl -d username:password http://localhost:5000/api/v1.0/1234567 How do I achieve the same within my unit test's get() ? Since my get/put/post require authentication otherwise the test would fail. 回答1: From RFC 1945, Hypertext Transfer

Service-Worker, “TypeError:Request failed at <anonymous>”

不想你离开。 提交于 2019-12-09 17:29:52
问题 I hope you can help me with my problem. Currently I build a PWA with a service-worker. It registerd successful, but something is wrong with the installation. The "caches.open"-promise result in an error: "TypeError: Request failed at ". You can see in Chrome, that the cache is registerd, but empty. I already checked the cache urls thousand times.. Here is my Service-worker Code var CACHE_NAME = 'surv-cache-1'; var resourcesToCache = [ '/', '/index.html', '/jquery-3.2.1.min.js', '/pouchdb.min

Using GitLab behind nginx enabled basic_auth?

你说的曾经没有我的故事 提交于 2019-12-09 16:28:16
问题 I've successfully installed GitLab for management of private repositories (it's quite awesome!). The problem I am having is by default, Gitlab login is presented when anyone hits my subdomain. I would like to protect the entire area with a basic_auth layer before the user gets the GitLab login screen. Unfortunately, this breaks my ability to push/pull from GitLab when it's enabled. my nginx config to enable basic_auth: auth_basic "Restricted"; auth_basic_user_file htpasswd; Any ideas on how I

Basic Authentication with embedded Jetty 7 server and no web.xml file

匆匆过客 提交于 2019-12-09 15:55:48
问题 I have an embedded implementation of Jetty 7 running as a service and want to add basic authentication with no web.xml file for a servlet. I created my credentials using the steps described here I thought that I could create the server, create a security handler with basic authentication and attach a HashLoginService to the security manager. But I am clearly missing several things because I am never getting prompt for credentials. Below is the code. Any help would be greatly appreciated.

JSON parse from a Remote URL which requires a username and password

自作多情 提交于 2019-12-09 11:03:37
问题 I have a url which points to a JSON output, however this URL requires a username and password through a standard apache pop up authentication box. I have tried to access this URL from my rails controller like the following: result = JSON.parse(open("http://user:pass@myurl.com/json").read) However it isn't working. I have the following at the top of my controller: require 'open-uri' require 'json' I just get an error which says ArgumentError, userinfo not supported. [RFC3986] 回答1: try to

Cannot use basic authentication while serving static files using express

放肆的年华 提交于 2019-12-09 08:38:37
问题 Using the Express framework for node.js, I'm trying to serve up static files contained in a directory while also putting basic authentication on it. When I do so, I am prompted for the username and password (as expected), but after I correctly enter them, I'm given a 404. If I remove the authentication check and serve up the same directory, I actually get the pages contained within it. Here's a quick server I whipped up as a proof-of-concept: var express = require('express'); var app =

How do I get basic authentication working on WebSphere?

一世执手 提交于 2019-12-09 06:23:58
问题 Okay, so I've been running a Java/Jersey webservice on Tomcat with basic authentication which works perfectly fine. I've got permissions set up in the web.xml file of my project, and users set up in tomcat-users.xml on the server. Works great. Problem is, now I have to transfer this project to WebSphere, which has nowhere near as simple of an implementation of basic authentication. I've seen this question: Websphere 6.1 and BASIC Authentication and looked at Chapter 7 of this pdf like

Custom HTML login form in HTTP Basic Auth

笑着哭i 提交于 2019-12-08 21:00:52
问题 I have an API with HTTP Basic Auth. If non-authenticated users send HTTP requests, then the server returns 401 status code and WWW-Authenticate header. And browser shows standard login form. Is it possible to show my HTML login form instead of standard browser's login form? 回答1: Since you are using an AJAX call, you could intercept the 401 status code from the server and redirect the user to a custom login form. For example let's suppose that you were using jQuery and trying to access the