basic-authentication

Basic auth in DNN Web API service

拥有回忆 提交于 2020-01-25 08:25:06
问题 I'm building a library type module for DNN that will house a Web API service that is meant to be called by a separate application. It has one controller that inherits from DnnApiController. I'd like the requests in this service to use basic auth, since the other app has no association with DNN and its users won't be interacting with the portal. All it can do is pass in a username and password (this will happen over SSL). We are running DNN 7.3 which is configured to use standard Forms

Proxy built with netcat not allowing http basic authentication

◇◆丶佛笑我妖孽 提交于 2020-01-25 06:38:16
问题 I made a simple proxy server using nc , here's the one-liner: mkfifo queueueue nc -l 8080 <queueueue | nc http://$JENKINS_HOSTNAME 80 >queueueue It listens on port 8080 and then forwards the data to a connection to our Jenkins server. Jenkins is behind a VPN, and the machine I am running this proxy on has VPN access. On my other machine (no VPN access), I would like to curl the Jenkins server, here's the command to initiate the request through the proxy: http_proxy=10.1.10.10:8080 curl --user

CakePHP form authentication for normal requests with basic authentication for JSON

心已入冬 提交于 2020-01-24 12:33:08
问题 I'm attempting to to build a web application that can be view by a user in a browser but also has an API for developers to interface with my application. My question is how do I change the authentication based on what type of request it is in CakePHP? I would like my application to prompt users using the site with form authentication but when a request comes in with a '.json' to use basic authentication. I've tried this in my AppController: class AppController extends Controller { public

Call web api with basic authentication always get 401 unauthorized from IIS

喜夏-厌秋 提交于 2020-01-24 05:44:12
问题 Tonight i come search some help about how to call a web api hosted in IIS. Everything work well in local from visual studio to iis express. But strangely, after publish on my IIS server. I always get 401 unauthorized :'( Here is the code i use and the settings from my IIS server. I will be very grateful if somebody can help me. Thank you ** The controller and the function i try to call (with basic authentication attribute) ** [HttpGet] [ActionName("Get_UserID")] [IdentityBasicAuthentication]

Cannot integrate Spring Security BASIC Authentication into Jersey/JAX-RS and Tomcat

假如想象 提交于 2020-01-24 05:24:14
问题 I am attempting to add BASIC authentication to a RESTful web service that I have created using Jersey/JAX-RS and Tomcat Apache 7.0. In the future I want to deploy this web service on WebSphere so I have chosen to use Spring Security (ver 2.5.6) for my project. My problem is this: though I believe my various xml files are correct and I have added spring.jar to my classpath I am getting the following error when starting the server. SEVERE: Error configuring application listener of class org

How do I set the WWW-Authentication header in an IAuthenticationFilter implementation?

社会主义新天地 提交于 2020-01-24 04:11:25
问题 I'm implementing basic authentication using MVC5's IAuthenticationFilter interface. My understanding is that this is now the preferred approach instead of using a DelegatingHandler. I've got it working but the www-authenticate header is not being returned in the response. This is my implementation of ChallengeAsync: public async Task ChallengeAsync(HttpAuthenticationChallengeContext context, CancellationToken cancellationToken) { var result = await context.Result.ExecuteAsync

Escaping username characters in basic auth URLs

人盡茶涼 提交于 2020-01-18 21:33:04
问题 When using http basic authentication, the username can be passed in the URL, e.g. http://david@foo.com/path/ But now suppose the username is an email address, e.g. david@company.com. Doing this is clearly ambiguous: http://david@company.com@foo.com/path/ Is there a way to escape the @ character in the username? I tried standard URL encoding: http://david%40company.com@foo.com/path/ But that didn't do it. 回答1: According to RFC 3986, section 3.2.1, it needs to be percent encoded: userinfo = *(

Possible to Send Basic Auth in Link in Java

拈花ヽ惹草 提交于 2020-01-17 04:07:27
问题 Is it possible to send basic auth credentials in a link? I have tried http://username:password@anapi.com but it's not working (in chrome on a mac, it keeps telling me to provide APIKey, which is password in this case). I need to be able to have a user click on a link and provide these credentials, if possible. The link is to sometimes huge files (< 1 gig). So instead of me, downloading the file in question I would like to just construct a link that points to it, and have the user download it.

IE, FireFox, Opera, and Safari don't display BASIC auth prompt on successive 401 responses from server

二次信任 提交于 2020-01-16 04:55:05
问题 SCENARIO: I have a java web app running in the latest Tomcat 6. I also have a single servlet filter that provides authentication. I support BASIC auth and it appears to work fine - most of the time. The first time a browser [pick any one - IE, FireFox, Opera, Safari, Chrome] hits one of our protected URL(s), it displays the standard browser-specific login prompt. IFF you enter the proper username/password - everything is fine, a new session is created, and everything operates normally. IF,

Optionally pass REMOTE_USER to application

杀马特。学长 韩版系。学妹 提交于 2020-01-15 03:24:09
问题 In our company we have an apache server running a django application (through wsgi) and some legacy php applications. To have some sort of single sign on we decided to use mod_auth_form and wsgi as the AuthFormProvider. In django itself we enabled the RemoteUserBackend and all works fine. The legacy php applications are also protected via mod_auth_form and wsgi. The problem is that there are some locations which should be accessible by authenticated and anonymous users where authenticated