Comments (9)
Hi Cornelius,
it's not exposed in ionic because it's not even exposed in this plugin. What do you need that function for? It's meant to be used internally to create the cookie header. Can you explain your use-case?
from cordova-plugin-advanced-http.
Hi Sefa,
I have a requirement whereby I need to set Cookies into an iframe in an ionic application.
from cordova-plugin-advanced-http.
Hmm ok, I still don't understand your use-case. This function is meant to create the cookie header string which is sent to the server. So if I'd expose this function you'd be able to get the stored cookies for a specific server. I'm still not sure if this is a good idea (security concerns). But how do you want to use this in an iframe?
e.g. running a GET request to http://www.google.de/
// first time internally call (no cookies are set, yet)
getCookieString('http://www.google.de/') --> '' (returns empty string)
// second time internally call (got a set-cookie answer from google on first request)
getCookieString('http://www.google.de/') --> '1P_JAR=2017-11-14-14; NID=117=eNWNV8UDsZIqxAvqTIZm290wdHWmeJyKwvYzEHsIUFu2CYu10ghFTSvPvS-Q2FSLu3QQw' (returns cookie string)
Is this you want to have?
from cordova-plugin-advanced-http.
Sorry, I should have explained it to you much better. This is my project requirements ...
I have to develop a single sign on (SSO) app. Authentication is achieved by using this advanced-http plugin and got the Cookies from the server. I then need to load an app within an iframe. This app is loaded via the same authenticator and this authenticator needs the cookies otherwise it will redirect to the authenticator login page.
So for example, authenticated via https://www.xxx.org by using this plugin and then for the iframe, the src url would be:
https://www.xxx.org/someapp
I have written this app in ionic.
I hope this is a bit clearer.
Thanks so much
from cordova-plugin-advanced-http.
Ok, thank you for your detailed description. The function "getCookieString" will be exposed in v1.9.0.
from cordova-plugin-advanced-http.
Thank you
from cordova-plugin-advanced-http.
Hello @silkimen,
I don't use this plugin yet, but is there any way to access HttpOnly cookie?
from cordova-plugin-advanced-http.
Hi @Bessonov,
yes, you can access HttpOnly cookies just like the other cookies by calling getCookieString(url)
.
from cordova-plugin-advanced-http.
Thank you for your response, @silkimen! But I don't think this is a good idea, because this isn't intended behavior of HttpOnly and leads to XSS. Therefore I can't use this plug in :(
from cordova-plugin-advanced-http.
Related Issues (20)
- Is this repo still maintained? HOT 2
- [Bug] An SSL error has occurred and a secure connection to the server cannot be made HOT 1
- [Bug] Apparent bug in serializeArray() HOT 1
- [[__NSArrayM insertObject:atIndex:]: object cannot be nil] [Cordova-Ios] App crash with SSL pinned active HOT 4
- How do I make downloaded files viewable in the iPhone's Files and Photos apps? HOT 1
- [Bug] sendRequest doesn't contain success/failure types HOT 1
- [Bug] [platform] deviceready has not fired after 5 seconds HOT 1
- documentation issue - broken link
- Pinned certificate works on Android but not iOS HOT 1
- [Bug] [android] cordova-plugin-file dependency installs version incompatible with cordova-android on Meteor
- Is there a new release planned? HOT 1
- HttpResponseType blob type empty data, even though the request is successful
- Dynamic Data
- [Bug] [Android] TLS connection could not be established: javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found. HOT 5
- uploadFIle doesn't send parameters
- [Bug] SSL pinning is not working for both iOS and Android HOT 3
- BSF Cordova Ecosystem Crowdfunding Plan
- Android & iOS Certificate Pinning
- [Android] No installed provider supports this key: com.android.org.bouncycastle.jcajce.PKCS12Key HOT 1
- how can we do ssl pinning in ionic capacitor react app?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cordova-plugin-advanced-http.