question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Proposal: Parameters in cookie

See original GitHub issue

Currently, the only way we can define a cookie parameter is like this:

parameters:
  - name: Cookie
    in: header
    type: string
    required: true

But that just requires a cookie - any cookie - to be present. There’s no way to distinguish between third-party cookies (e.g. google analytics, advertising, etc.) and our API’s cookies. It would be nice to be able to do this:

parameters:
  - name: myApiCookie
    in: cookie
    type: string
    required: true

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Reactions:10
  • Comments:14 (11 by maintainers)

github_iconTop GitHub Comments

6reactions
mohsen1commented, Oct 20, 2014

If we are adding cookies to parameters we should add it to response object too. That would help tooling test responses more accurately

3reactions
JamesMessingercommented, Apr 2, 2016

For public APIs, cookie-based auth doesn’t seem to be as common as other options, such as OAuth. But it’s used very frequently for enterprise APIs, b2b APIs, and single-sign-on solutions. There are even some popular public APIs that use cookie-based auth, such as the ones that @jasonh-n-austin posted the other day

Read more comments on GitHub >

github_iconTop Results From Across the Web

php - How to pass cookies as parameters from middleware ...
Try merging the cookie value in with the request input: $merged = $request->merge(['name' => $request->cookie('name')]); ...
Read more >
Cookie parameters in .xsjs - SAP Community
According to the SAP HANA XS JavaScript Reference, cookies are represented as name-value pairs (they are elements of a TupelList object). The command....
Read more >
SameSite cookies explained - web.dev
Learn how to mark your cookies for first-party and third-party usage with the SameSite attribute. You can enhance your site's security by ...
Read more >
Cookies API - The Chromium Projects
The proposed API allows Chrome extensions to access the browser's cookies, without having to send ... This parameter is null if no such...
Read more >
Proposal in MCMC lives in bigger space than parameter ...
By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found