session-cookies

How to save session_id as cookie value and send it to server in Android?

不打扰是莪最后的温柔 提交于 2019-12-02 04:02:46
I am working on a app using web services calls. I am calling my Login webservice as follows String url = "http://mydomaim.com/login.php"; UserFunctions userFunction = new UserFunctions(); JSONObject json = userFunction.loginUser(userEmail, password, url); It works fine and send me response as show below { "userName":"a", "login_success":1, "user_id":"3", "session_id":"1067749aae85b0e6c5c5e697b61cd89d", "email":"a" } I parse this response, and successfully and got the session id in a variable. Now I have to call an other webservice appending this session_id as cookie value. QUESTION How to

How implement 'remember me' in laravel 5.1?

家住魔仙堡 提交于 2019-12-02 03:40:08
How to implement rememeber me functionality in laravel 5.1? Can anyone give me an example? Laravel authentication offers remember me functionality out of the box. In order to use it you need to do 2 things: add remember_token column in your users table - this is where the token will be stored pass true as a second parameter of Auth::attempt() to enable remember me behaviour If you do this, Laravel will generate a token that will be saved in users table and in a cookie. On subsequent requests, even if session cookie is not available, user will be authenticated automatically as long as remember

Cookies aren't persisting in PHP?

百般思念 提交于 2019-12-02 03:38:58
How do I get the cookies to persist in php? give_cookie.php <?php if (!isset($_COOKIE["muffin"])) setcookie("muffin", "55", 100 * 60 * 60 * 24 * 30); $_COOKIE["lid"]=true; ?> jar.php <?php var_dump($_COOKIE); if($_COOKIE["lid"]) echo "open"; ?> Running the code in that order gives me output: array(0) { } Notice: Undefined index: lid in jar.php on line 3 Embedding the code from jar.php in give_cookie.php gives me output: array(1) { ["lid"]=> bool(true) } open You're supposed to give a UNIX timestamp of when the cookie will expired (calculated since the epoch) as the third argument to the

Setting ServiceStack Cookie Domain in Web.Config Causes Session Id to Change on Every Request

删除回忆录丶 提交于 2019-12-02 03:24:28
As per ServiceStack - Authentication for domain and subdomains , I set the cookie domain in the httpCookies section and it in fact works - it sets the domain of the cookie properly. But what I noticed is, once I add this line to the config, a new session id is generated on every request, regardless if the user has already been authenticated. My code is bare bones and simple. My app host code: public override void Configure(Funq.Container container) { Plugins.Add(new AuthFeature(() => new CustomUserSession(), new IAuthProvider[] { new CustomCredentialsProvider(), })); container.Register

ASP.NET Core authentication cookie only received once

霸气de小男生 提交于 2019-12-02 02:32:28
I am developing an application with ASP.NET Core and I am using a custom Cookie Authentication. My CookieAuthenticationOptions are: app.UseCookieAuthentication(new CookieAuthenticationOptions() { AuthenticationScheme = CookieAuthenticationDefaults.AuthenticationScheme, LoginPath = new PathString("/login"), AccessDeniedPath = new PathString("/unauthorized/"), AutomaticAuthenticate = true, AutomaticChallenge = true }); The cookie is created just fine and I can see it in the browser settings throughout the whole time I am running the application. This is my HomeController class: public

how to make opencart multi-store share same cart over multiple TLDs?

牧云@^-^@ 提交于 2019-12-02 02:05:44
问题 I have the following scenario: domain1.com - store1 - opencart 1.5.6 installed domain2.com - store2 domain3.com - store3 I managed to install all 3 stores on different domains and all of them are using the same opencart install (store1). So far all seems to work properly. What I need is when the user is on domain1.com , adds product1 in his cart, then navigates to store2 (domain2.com) and adds product2 in his cart - now he should have both product1 from shop1 and product2 from shop2 in his

ASP.NET Core authentication cookie only received once

妖精的绣舞 提交于 2019-12-02 01:49:37
问题 I am developing an application with ASP.NET Core and I am using a custom Cookie Authentication. My CookieAuthenticationOptions are: app.UseCookieAuthentication(new CookieAuthenticationOptions() { AuthenticationScheme = CookieAuthenticationDefaults.AuthenticationScheme, LoginPath = new PathString("/login"), AccessDeniedPath = new PathString("/unauthorized/"), AutomaticAuthenticate = true, AutomaticChallenge = true }); The cookie is created just fine and I can see it in the browser settings

how to make opencart multi-store share same cart over multiple TLDs?

你离开我真会死。 提交于 2019-12-02 01:33:09
I have the following scenario: domain1.com - store1 - opencart 1.5.6 installed domain2.com - store2 domain3.com - store3 I managed to install all 3 stores on different domains and all of them are using the same opencart install (store1). So far all seems to work properly. What I need is when the user is on domain1.com , adds product1 in his cart, then navigates to store2 (domain2.com) and adds product2 in his cart - now he should have both product1 from shop1 and product2 from shop2 in his cart. In other words, all stores should behave like one, if the user is logged in into store1 then he

Security: Session Identifier Not Updated in tcl

情到浓时终转凉″ 提交于 2019-12-02 01:31:59
I'm working on open-source application "Project-Open" and during the scanning I got the following vulnerability: [Medium] Session Identifier Not Updated Issue: 13800882 Severity: Medium URL: https://<server_name>/register/ Risk(s): It is possible to steal or manipulate customer session and cookies, which might be used to impersonate a legitimate user,allowing the hacker to view or alter user records, and to perform transactions as that user Fix: Do not accept externally created session identifiers though the fix is mentioned but it is not sufficient for me to understand it completely.please

is it possible to set unlimited time for a cookie to a session variable?

帅比萌擦擦* 提交于 2019-12-01 21:36:23
How do I set unlimited time to a cookie for a session? I have tried the following below but I still get undefined index notices on my sessions after a day: setcookie('idcourse', 'CourseID', 9999999999); setcookie('namecourse', 'CourseName', 9999999999); setcookie('id', 'ID', 9999999999); if (isset($_POST['idcourse'])) { $_SESSION['idcourse'] = $_POST['idcourse']; } if (isset($_POST['namecourse'])) { $_SESSION['namecourse'] = $_POST['namecourse']; } if (isset($_POST['id'])) { $_SESSION['id'] = $_POST['id']; } You must add an expiry date, or the cookie will act like a session and expire when you