basic-authentication

Javascript redirect with headers or session id

时光怂恿深爱的人放手 提交于 2019-12-19 05:00:05
问题 I have two web pages that I am trying to send information between. One is the login page that takes in the users information and calls a web-service to determine if the user is authenticated. Upon ensuring authentication I want to redirect to my other web page with some way of telling that the user has logged in and is authenticated. I know that javascript has window.location = url but this does not forward the authentication header or anything else as far as I know. Is there a way to

Basic Authentication with RestTemplate - compilation error - The constructor HttpClient() is not visible

十年热恋 提交于 2019-12-19 03:58:45
问题 trying to add basic auth to restTemplate problem I encounter is that i cant initialize : (with both the imports in the code snippet) HttpClient client = new HttpClient(); This code resolves in a compilation error (with no suggestion available from eclipse to fix this issue) 1) what is the problem ? 2) Am i importing the wrong class ? my code snippet : import org.apache.http.client.HttpClient; //OR (not together) import sun.net.www.http.HttpClient; HttpClient client = new HttpClient(); //this

WCF Service with wsHttpBinding - Manipulating HTTP request headers

走远了吗. 提交于 2019-12-19 03:44:13
问题 I have been following this tutorial in order to get username authentication with transport security working in my WCF service. The tutorial however refers to using basicHttpBinding which is unacceptable - I require wsHttpBinding . The idea is to have a custom BasicAuthenticationModule on WCF service which would read the "Authorization" header from the HTTP request and perform the auth process according to "Authorization" header contents. The problem is that "Authorization" header is missing!

Camel http4 download file using Basic authentication over Https

北城以北 提交于 2019-12-19 03:14:35
问题 I am trying to download a file from a Https url which requires Basic authentication. I am using HTTP4 I am trying to download from url - https://ebc.cybersource.com/ebc/DownloadReport/xxx.csv?authMethod=Basic&authUsername=scott&authPassword=tiger After the file is downloaded I need to save it to a folder. Here's what my code looks like from(xxx) .to("http4://ebc.cybersource.com/ebc/DownloadReport/xxx.csv?authMethod=Basic&authUsername=scott&authPassword=tiger") .to("file:target/messages

Issue FORM POST Request From PHP using HTTP Basic Authentication

江枫思渺然 提交于 2019-12-18 21:51:45
问题 I hope this is a relatively straight forward thing to do, and that my google skills have simply failed me on this occasion. I have a BASIC authentication protected resource which I want to have PHP perform a POST HTTP request against. I have tried injecting Authentication: Basic (encrypted u/p data) into the headers which didn't appear to work - so I wonder, can the powers of Greyskull i mean StackOverflow provide any guidance. $req .= "&cmd=_initiate_query"; $header = "POST /someendpoint

Jquery .ajax fails when basic auth username has @ symbol (ios / cordova)

五迷三道 提交于 2019-12-18 16:12:27
问题 I have a phonegap app w/ jQuery 1.9.1 Worked great as long as the username doesn't have '@' symbol in it (like in email addresses). It only fails on iOS. I suspect it's probably not urlencoding the @ sign or something. iPhone , it never hits any callbacks (done, fail or always), Wireshark shows request doesn't get to the server . Chrome Desktop : works fine. Android , works fine. $.ajax({ url: "https://" + this.hostname + "/alertusmw/services/rest/" + endPoint, type: method, dataType: 'json',

Get the HTTP Basic Auth username from javascript?

我的梦境 提交于 2019-12-18 15:47:41
问题 I have a webpage that is only accessible over http basic auth. How can I figure out the basic auth username in javascript in that page. i.e. when someone visits it (after logging in), I want to make a popup that says "Hello, you're currently signed in as the user $USERNAME" 回答1: It's not possible purely from JavaScript. You'd have to have the server side script pick up the username from the request, and insert it in the generated page code for the script to pick up. (eg. <script type="text

Basic Authentication in ASP.NET Core

僤鯓⒐⒋嵵緔 提交于 2019-12-18 13:53:11
问题 Question How can I implement Basic Authentication with Custom Membership in an ASP.NET Core web application? Notes In MVC 5 I was using the instructions in this article which requires adding a module in the WebConfig . I am still deploying my new MVC Core application on IIS but this approach seems not working. I also do not want to use the IIS built in support for Basic authentication , since it uses the Windows credentials. 回答1: ASP.NET Security will not include Basic Authentication

HTTPClient sends out two requests when using Basic Auth?

主宰稳场 提交于 2019-12-18 13:01:08
问题 I have been using HTTPClient version 4.1.2 to try to access a REST over HTTP API that requires Basic Authentication. Here is client code: DefaultHttpClient httpClient = new DefaultHttpClient(new ThreadSafeClientConnManager()); // Enable HTTP Basic Auth httpClient.getCredentialsProvider().setCredentials( new AuthScope(AuthScope.ANY_HOST, AuthScope.ANY_PORT), new UsernamePasswordCredentials(this.username, this.password)); HttpHost proxy = new HttpHost(this.proxyURI.getHost(), this.proxyURI

What is the cause and solution to SVN: Could not authenticate to server: rejected Basic challenge?

心已入冬 提交于 2019-12-18 12:09:29
问题 If you search around the web you will see this question asked a lot but there are no clear answers. Here is my particular case. I am using Versions SVN client on a mac but I get the same problem when using the command line. I have personal repo credentials to someone else's repo and it is working on my one machine where I set it up 6 months ago. I copied my .ssh folder from my user directory to a different machine, installed versions on that machine, and set up by login credentials, only it