basic-authentication

Authentication in a client application for REST services

☆樱花仙子☆ 提交于 2019-12-11 15:55:46
问题 Firstly, I'm going to explain my objective: I developed some REST services using Jersey, that were automatically generated from my MySQL DataBase. In that DataBase I have a Login table, that have the information of who can access the REST services. With this Login table I've allready implemented Basic-Authentication for my Jersey REST services, and that's working. When I go to the REST services mainpage, I have to put the correct login and password, and then I can access all information of

PHP: Download file from different web server using basic authentication?

落爺英雄遲暮 提交于 2019-12-11 15:30:00
问题 I have been using PHP for a while but I am not too too advanced. I do not have much experience with server-to-server stuff. I need to research setting up a data-feed with a vendor. The contact person that I talked to said I would be downloading a file from their server using a username and password via basic authentication. Can someone please give me a break down on how to do that? Thanks!! 回答1: $f = fopen("http://$username:$password@example.com"); then just use the same methods as for

IIS app pool application asks for password (basic auth) but neither postman or insomnia can respond

江枫思渺然 提交于 2019-12-11 15:17:38
问题 We have an IIS server running a EPICOR ERP system. The ERP system installs IIS application pool, which certain urls are remapped to be handled by the app pool. Here is what it says about the verification: For security reasons you should always use https with REST API REST API supports 2 authentication methods Basic authentication The username and password are combined into a string separated by a colon and encoded using Base64. The result is placed into Authorization header: Authorization:

Multiple Spring Security configurations for REST via BasicAuth vs. Session with CSRF

别来无恙 提交于 2019-12-11 14:53:41
问题 In am working on a Spring Boot (1.3.2) application which just serves Spring MVC REST controllers that are consumed by a JavaScript single page app (deployed standalone, not inside the boot jar). The setup uses Spring Security , Spring Session and has CSRF protection enabled. This works as expected for the JavaScript client. A login is done by a GET call with Basic Auth provided, the backend creates a session, returns a cookie and also provides the CSRF token in the response according to this

htaccess exclude multiple url from Basic Auth

前提是你 提交于 2019-12-11 13:27:20
问题 Hi i need to protect my app during the testing phase. I read this post about excluding one url from Basic Auth But i'd like to exclude 2 urls : /api/* /oauth/v2/token So the entire app will be protected except for those two urls, that will be public. Otherwise i can't access my api routes. My .htaccess for now is : # Protect the app with password AuthUserFile /home/master/public_html/web/.htpasswd AuthName "Protected" AuthType Basic Require valid-user So i'm guessing i should need some sort

HttpWebRequest with basic authentication fails with 401 error for DefaultNetworkCredentials

谁说胖子不能爱 提交于 2019-12-11 13:22:12
问题 I am testing an application with a local Web server (IIS, Windows 8), the site requires Basic authentication, and as long as I explicitly pass my credentials, everything works fine: request.Credentials = new NetworkCredential("User", "Password", "Domain"); request.PreAuthenticate = true; But I would like to use integrated security, so I tried to change the first line as follows: request.Credentials = CredentialCache.DefaultNetworkCredentials; (I also tried DefaultCredentials) I checked the

Phonegap iOS ajax request never completes

谁说胖子不能爱 提交于 2019-12-11 13:11:34
问题 I have a phonegap app which connects to a web service and authenticates using http basic authentication. It is built using phonegap build and targets Android and iOS. On a login view, an ajax request fires against the remote server to check if credentials are correct, then if so, logs the user in to the main application. This completes successfully in ripple emulator on desktop pc and when also when deployed onto an Android device. However, when the app is deployed onto an iOS device (ipod

unauthorized error when using HttpClient

Deadly 提交于 2019-12-11 11:13:13
问题 using System; using System.Collections.Generic; using System.Net; using System.Net.Http; using System.Net.Http.Headers; using System.Text; namespace ConsoleProgram { public class Class1 { private const string URL = "https://sun.domain.com/v1/service/token"; static void Main(string[] args) { var handler = new HttpClientHandler(); handler.Credentials = new System.Net.NetworkCredential("admin@client", "admin"); HttpClient client = new HttpClient(handler); //client.DefaultRequestHeaders

TypeError: native Qt signal is not callable

醉酒当歌 提交于 2019-12-11 09:32:13
问题 I'm trying to make a request to a protected webpage, so therefore I'm trying to authenticate with help from QAuthenticator() . However, I get the following error: mgr.authenticationRequired(response, auth) TypeError: native Qt signal is not callable This is a part of my script: def authenticate(self): username = 'user' password = 'pass' url = 'http://someurl.com' mgr = QNetworkAccessManager(self) auth = QAuthenticator() auth.setUser(username) auth.setPassword(password) response =

Where should I put username/password for http basic authentication in rails app

夙愿已清 提交于 2019-12-11 09:14:15
问题 I am going to use http-basic-authentication in a rails app. I watched this railscast to figure out how do do that: http://railscasts.com/episodes/82-http-basic-authentication In the video he says not to put the username and password directly in the code. Where should I put them then? I am using rails 3.1.0. 回答1: You want to move them into config files. Ceck out this RailsCast about "Application Configuration". 来源: https://stackoverflow.com/questions/12574519/where-should-i-put-username