basic-authentication

Spring RestTemplate: SSL handshake failure

喜欢而已 提交于 2019-12-04 06:47:30
I am trying to consume a restful ws with basic auth. I did not import any cert into my keystore. When I use chrome plugin Advance Rest client to test it (using basic auth with base64 encoded username:pass). I can see the response back. So far so good. But when I develop Java code to consume this ws, I get SSL handsake failure: org.springframework.web.client.ResourceAccessException: I/O error: Received fatal alert: handshake_failure; nested exception is javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure at org.springframework.web.client.RestTemplate.doExecute

Pull csv to Google Sheets with basic authentication

99封情书 提交于 2019-12-04 06:22:37
问题 I need to pull a csv from a URL that requires basic auth. I have found this code that works, apart from parsing the csv, clearing and setting the cells. I think there is a few bugs as it is old code, such as clear.contents() should be clear.content() . And even with hard coding the data in where sheets is, im still struggling to get it to work, has anyone else found a solution?: // this function assumes the CSV has no fields with commas, // and strips out all the double quotes function

HTTP Basic Authentication + Access Token?

喜欢而已 提交于 2019-12-04 05:38:40
I am developing a REST API that I plan on using with a web and IOS app. I intend for this API to be private for sometime (private meaning I only want my web app and ios app to access the api). I have read about many different authentication methods but I am still to confused to select the appropriate authentication method for my API. From what I understand, oAuth2 is for allowing users to login to your APP using other service providers so that you can access the data on the respective service provider. I am accessing the data in my own API so I believe this does not apply to me? So, here is

WindowsIdentity.Impersonate in ASP.NET randomly “Invalid token for impersonation - it cannot be duplicated”

混江龙づ霸主 提交于 2019-12-04 05:07:26
I have an ASP.NET app that requires users to sign in with their domain accounts using Basic Authentication. The user can make a selection, then press a button. At some point after pressing the button is this code: WindowsIdentity.Impersonate(userIdentity.Token) . userIdentity is of type WindowsIdentity , and it was previously set to (WindowsIdentity)User.Identity . userIdentity is stored as a session variable, and I think that's because, after the button is pressed, the page containing this code is called via AJAX. When I hit this code, it works about 2/3 of the time, but 1/3 of the time, I

LDAP authentication without managerDN and manager password

非 Y 不嫁゛ 提交于 2019-12-04 05:05:27
问题 I am writing an application in Java Spring framework to perform Active Directory LDAP authentication. I am succeeding in connecting to my organization LDAP. Here is the configuration settings:Spring-security.xml <!-- This is where we configure Spring-Security --> <security:http auto-config="true" use-expressions="true" access-denied-page="/oops"> <security:intercept-url pattern="/auth/*" access="isAuthenticated()" /> <security:logout invalidate-session="true" logout-success-url="/" logout-url

Solr 4 with basic authentication

夙愿已清 提交于 2019-12-04 04:27:38
问题 I am trying to connect to solr using solrj. My solr instance runs in jetty and is protected with basic authentication. I found these links that contain relevant information. http://grokbase.com/t/lucene/solr-user/1288xjjbwx/http-basic-authentication-with-httpsolrserver Preemptive Basic authentication with Apache HttpClient 4 However, I still get the following exception: Caused by: org.apache.http.client.ClientProtocolException at org.apache.http.impl.client.AbstractHttpClient.execute

Using GitLab behind nginx enabled basic_auth?

白昼怎懂夜的黑 提交于 2019-12-04 03:43:50
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 can enable basic_auth without breaking git / gitlab functionality? Add this to /etc/gitlab/gitlab.rb :

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

我的未来我决定 提交于 2019-12-04 03:24:54
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. server = new Server(port); server.addConnector(getSslChannelConnector(securePort)); server

Sending Basic authentication over http

試著忘記壹切 提交于 2019-12-04 01:28:49
问题 I am trying to read the source from a page that requires basic authentication. However, using a Header and even Credentials in my HttpWebRequest, I still get a Unauthorized Exception [401] returned. string urlAddress = URL; string UserName = "MyUser"; string Password = "MyPassword"; HttpWebRequest request = (HttpWebRequest)WebRequest.Create(urlAddress); if (UserName != string.Empty) { string encoded = System.Convert.ToBase64String(System.Text.Encoding.GetEncoding("ISO-8859-1").GetBytes

How can I get browser authentication popup?

元气小坏坏 提交于 2019-12-04 01:18:36
Can anyone tell me, how can I get this browser authentication window ? 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 authentication (used most often) is constructed as following: WWW-Authenticate: Basicrealm="insert realm" That type of