You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by denisx304 <gi...@git.apache.org> on 2017/08/21 16:54:48 UTC

[GitHub] cordova-plugin-inappbrowser pull request #238: added cookies support for And...

GitHub user denisx304 opened a pull request:

    https://github.com/apache/cordova-plugin-inappbrowser/pull/238

    added cookies support for Android

    <!--
    Please make sure the checklist boxes are all checked before submitting the PR. The checklist
    is intended as a quick reference, for complete details please see our Contributor Guidelines:
    
    http://cordova.apache.org/contribute/contribute_guidelines.html
    
    Thanks!
    -->
    
    ### Platforms affected
    Android
    
    ### What does this PR do?
    Allows the `cordova.InAppBrowser.open()` function to receive another parameter, `cookies`, an object described like `name: value`. It sets then those cookies through Android native code.
    
    ### What testing has been done on this change?
    `cordova.InAppBrowser.open(page, "_self", null, { "cookieName": "cookieValue" });`
    The cookies were verified on the server-side.
    
    ### Checklist
    - [ ] [Reported an issue](http://cordova.apache.org/contribute/issues.html) in the JIRA database
    - [ ] Commit message follows the format: "CB-3232: (android) Fix bug with resolving file paths", where CB-xxxx is the JIRA ID & "android" is the platform affected.
    - [ ] Added automated test coverage as appropriate for this change.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/denisx304/cordova-plugin-inappbrowser master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-plugin-inappbrowser/pull/238.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #238
    
----
commit 9a6f4c4dc5164073ac183eba2954e732de92519b
Author: Denis Visan <de...@inomedica.ro>
Date:   2017-08-21T16:40:04Z

    added cookies support for Android

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-inappbrowser issue #238: added cookies support for Android an...

Posted by denisx304 <gi...@git.apache.org>.
Github user denisx304 commented on the issue:

    https://github.com/apache/cordova-plugin-inappbrowser/pull/238
  
    exactly


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-inappbrowser issue #238: added cookies support for Android an...

Posted by danova123 <gi...@git.apache.org>.
Github user danova123 commented on the issue:

    https://github.com/apache/cordova-plugin-inappbrowser/pull/238
  
    I mean its a great addition to the existing plugin. I will use it to set cookies( Name and Value) but i need to read cookies first from a different browser to pass it to the next one. I will be using it for Cookie Based Authentication, where i receive a session cookie from user login and i will pass the same cookie to access api data from the same domain. Do you have plans of calling getCookie method where user can pass the cookie name and inappbrowser will return the cookie value.   


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-inappbrowser issue #238: added cookies support for Android an...

Posted by janpio <gi...@git.apache.org>.
Github user janpio commented on the issue:

    https://github.com/apache/cordova-plugin-inappbrowser/pull/238
  
    May I asked what is a use case for this? What problem does this solve?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-inappbrowser issue #238: added cookies support for Android

Posted by denisx304 <gi...@git.apache.org>.
Github user denisx304 commented on the issue:

    https://github.com/apache/cordova-plugin-inappbrowser/pull/238
  
    @danova123 Please go through my commit. The `cordova.InAppBrowser.open` receives one more parameter, which is an object. The keys of this object are the name of the cookies that you want to set, and the values are the values of the cookies.
    
    It simply sets these cookies with `CookieManager.setCookie` to the domain where the url belongs.
    
    Did my comment answer your question?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-inappbrowser issue #238: added cookies support for Android an...

Posted by danova123 <gi...@git.apache.org>.
Github user danova123 commented on the issue:

    https://github.com/apache/cordova-plugin-inappbrowser/pull/238
  
    @denisx304 Thanks for the clarification. Looking forward to see it getting added to the base branch soon.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-inappbrowser issue #238: added cookies support for Android an...

Posted by denisx304 <gi...@git.apache.org>.
Github user denisx304 commented on the issue:

    https://github.com/apache/cordova-plugin-inappbrowser/pull/238
  
    Whenever you want to send cookies to one url.
    For exemple keeping the user logged in from your mobile application to the web application.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-inappbrowser issue #238: added cookies support for Android

Posted by denisx304 <gi...@git.apache.org>.
Github user denisx304 commented on the issue:

    https://github.com/apache/cordova-plugin-inappbrowser/pull/238
  
    @danova123 what do you mean?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-inappbrowser issue #238: added cookies support for Android an...

Posted by janpio <gi...@git.apache.org>.
Github user janpio commented on the issue:

    https://github.com/apache/cordova-plugin-inappbrowser/pull/238
  
    @denisx304 Does this PR enable me to set random cookies for e.g. google.com when opening InAppBrowser to open google.com?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-inappbrowser issue #238: added cookies support for Android

Posted by danova123 <gi...@git.apache.org>.
Github user danova123 commented on the issue:

    https://github.com/apache/cordova-plugin-inappbrowser/pull/238
  
    Does it also reads the cookie value?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-inappbrowser issue #238: added cookies support for Android an...

Posted by denisx304 <gi...@git.apache.org>.
Github user denisx304 commented on the issue:

    https://github.com/apache/cordova-plugin-inappbrowser/pull/238
  
    @janpio You can send any cookie as long as the server interprets it.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-inappbrowser issue #238: added cookies support for Android an...

Posted by denisx304 <gi...@git.apache.org>.
Github user denisx304 commented on the issue:

    https://github.com/apache/cordova-plugin-inappbrowser/pull/238
  
    I understand you now. This PR does not include that feature.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-inappbrowser issue #238: added cookies support for Android an...

Posted by thesourav123 <gi...@git.apache.org>.
Github user thesourav123 commented on the issue:

    https://github.com/apache/cordova-plugin-inappbrowser/pull/238
  
    @denisx304 i am facing an issue with the original inappbrowser not saving session cookies when app is closed in iOS(But, works in Android). Will this merge fix my issue.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-inappbrowser issue #238: added cookies support for Android

Posted by danova123 <gi...@git.apache.org>.
Github user danova123 commented on the issue:

    https://github.com/apache/cordova-plugin-inappbrowser/pull/238
  
    @denisx304 I meant does it return cookies from server when user logs in( For example)
    will CookieManager.getCookie be called at any point of time or could it be called manually? 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-inappbrowser issue #238: added cookies support for Android an...

Posted by thesourav123 <gi...@git.apache.org>.
Github user thesourav123 commented on the issue:

    https://github.com/apache/cordova-plugin-inappbrowser/pull/238
  
    This was needed. Finally, thanks a lot. i tested and it works. Yay!!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-inappbrowser issue #238: added cookies support for Android an...

Posted by janpio <gi...@git.apache.org>.
Github user janpio commented on the issue:

    https://github.com/apache/cordova-plugin-inappbrowser/pull/238
  
    You are right, this is equivalent to messing with the local cookies with the developer tools of your browser.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org