basic-authentication

PHP cURL Basic Authentication Alternatives for CURLOPT_HTTPHEADER & CURLOPT_USERPWD…?

こ雲淡風輕ζ 提交于 2019-12-04 01:09:40
问题 Are there any alternatives to using CURLOPT_HTTPHEADER & CURLOPT_USERPWD for supplying Basic Authentication for cURL PHP? I have a super long password, so CURLOPT_USERPWD wont work as it truncates at 256 characters. curl_setopt($data, CURLOPT_USERPWD, $username . ":" . $password); And I would like to stay away from using CURLOPT_HTTPHEADER for security reasons. curl_setopt($data, CURLOPT_HTTPHEADER, "Authorization: Basic " . base64_encode($username . ":" . $password)); Any alternatives? 回答1:

How to authenticate to Visual Studio Team Services with the new basic authentication from a .Net Windows Service?

限于喜欢 提交于 2019-12-04 00:52:25
问题 I am trying to access https://visualstudio.com (formerly known as https://tfs.visualstudio.com, http://www.tfspreview.com) from my Windows Service written on .NET. I want to use the new basic authentication but I couldn't find a way to do it. I found a lot of links to the blog post Team Foundation Service updates - Aug 27 but it is using the Team Explorer Everywhere Java client for TFS. Is there a new version of the TFS .NET Object Model to support the basic authentication? By the way I've

BasicAuthentication in android for webview not working

我们两清 提交于 2019-12-04 00:46:17
问题 Hi I want to open this url http://3864.cloud-matic.net/ from my android webview and I have tried many ways but the app even not opens mainActivity. What I have tried is below. public void onCreate(Bundle state) { super.onCreate(state); setContentView(R.layout.main); WebView webView = (WebView) findViewById(R.id.webView1); webView.setHttpAuthUsernamePassword("cloud-matic.net/", "realm", username, password); webView.loadUrl("http://3864.cloud-matic.net/"); } Please give me idea where I am wrong

Logoff button IIS6 ASP.NET Basic Authentication

本秂侑毒 提交于 2019-12-03 20:14:28
I have a requirement for an explicit logout button for users in a ASP.NET web app. I am using IIS6 with Basic Authentication (SSL). I can redirect to another web page but the browser keeps the session alive. I have googled around and found a way to do it by enabling an active x control to communicate with IIS and kill the session. I am in a restricted environment that does not allow forms authentication and active x controls are not forbidden as well. Has anyone else had this requirement and how have you handled it? Okay that is what I was afraid of. I have seen similar answers on the net and

Custom HTTP Basic Authentication for ASP.NET Web Services on .NET 3.5/VS 2008

杀马特。学长 韩版系。学妹 提交于 2019-12-03 18:36:14
问题 I am refactoring a working ASP.NET Web Application to expose Web Services interface using ASP.NET Web Service. According to Web Services authentication - best practices, Basic Auth over https is the way to go. Let's assume it is, as opposed to doing WS-Security, X509, etc.. On .NET 3.5/VS 2008, what's the simplest way of implementing custom http Basic Authentication (non-Windows account), for example, accepting only if user name is "foo" and password is "bar". Ultimately, I'd like Thread

Spring security, either http basic or form login authentication

我们两清 提交于 2019-12-03 17:16:58
I have a web app developed using spring mvc and spring security 3.2. I want my app using http basic authentication for restful service and form login authentication for other part. Below is my security configuration: <http pattern="/services/**" create-session="stateless" use-expressions="true"> <intercept-url pattern="/**" access="hasRole('ROLE_REMOTE,ROLE_USER')"/> <http-basic /> </http> <http auto-config="true" use-expressions="true"> <intercept-url pattern="/static/**" access="permitAll" /> <intercept-url pattern="/**" access="hasRole('ROLE_USER')" /> <form-login login-page="/login.do"

Basic authentication in REST-application

泄露秘密 提交于 2019-12-03 16:16:35
问题 Environment: JAVA Glassfish REST-services in different machine HTML5-client with AJAX and JQuery Jersey This is what I have implemented so far: HTML5-client ### $('#btnSignIn').click(function () { var username = $("#username").val(); var password = $("#password").val(); function make_base_auth(user, password) { var tok = user + ':' + password; var final = "Basic " + $.base64.encode(tok); console.log("FINAL---->" + final); alert("FINAL---->" + final); return final; } $.ajax({ type: "GET",

Can't authenticate user in laravel

北城余情 提交于 2019-12-03 13:42:32
$userdata = array( 'email' => Input::get('email'), 'password' => Input::get('password') ); if (Auth::attempt($userdata)) { echo 'SUCCESS!'; } else { return Redirect::to('login'); } when i run the application from browser i got this error : Argument 1 passed to Illuminate\Auth\EloquentUserProvider::validateCredentials() must be an instance of Illuminate\Auth\UserInterface, instance of User given, called in /home/srtpl17/Sites/yatin.sr/vendor/laravel/framework/src/Illuminate/Auth/Guard.php on line 316 and defined What have I done incorrectly? TonyArra It sounds like from your error that your

Embedding a Secured Grafana into Web Application

╄→гoц情女王★ 提交于 2019-12-03 12:44:57
问题 I want to embed Grafana into my web application using AngularJS. The goal is, when user is in my application, she should be able to click on a button and load the Grafana UI. In itself, this is an easy task. To do this, I have apache proxying Grafana and returning any necessary CORS headers. The apache reverse proxy config is as follows: Header always set Access-Control-Allow-Origin "*" Header always set Access-Control-Allow-Methods "POST, GET, OPTIONS, DELETE, PUT" Header always set Access

Logout from web app using tomcat Basic authentication

为君一笑 提交于 2019-12-03 12:36:52
问题 I am using tomcat basic authentication for my web app: I added following lines to web.xml in my web app: <security-constraint> <web-resource-collection> <web-resource-name>webpages</web-resource-name> <url-pattern>/*</url-pattern> </web-resource-collection> <auth-constraint> <role-name>*</role-name> </auth-constraint> <user-data-constraint> <!-- transport-guarantee can be CONFIDENTIAL, INTEGRAL, or NONE --> <transport-guarantee>NONE</transport-guarantee> </user-data-constraint> </security