Replacement for #255#316
Conversation
| ================= | ||
|
|
||
| The `Same-site cookie RFC | ||
| <https://tools.ietf.org/html/draft-west-first-party-cookies-07>`_ updates |
There was a problem hiding this comment.
Remove extra space:
07>`_ updates`
| `RFC6265 <https://tools.ietf.org/html/rfc6265>`_ to include a new cookie | ||
| attribute named ``SameSite``. | ||
|
|
||
| WebOb provides support for setting the ``SameSite`` attribute in it's cookie |
| attribute named ``SameSite``. | ||
|
|
||
| WebOb provides support for setting the ``SameSite`` attribute in it's cookie | ||
| API's, using the ``samesite`` keyword argument. |
There was a problem hiding this comment.
APIs (neither possessive nor conjunction)
| The name of the cookie. | ||
|
|
||
| ``value`` | ||
| The ``value`` of the cookie, if it is ``None`` it will generate a cookie |
There was a problem hiding this comment.
The ``value`` of the cookie. If it is ``None``, it
| Default: ``None`` (browser scope). | ||
|
|
||
| ``path`` | ||
| The path used for the session cookie. Default: ``'/'``. |
There was a problem hiding this comment.
Default: /. (because we use a literal, no need to quote)
| session cookie. Default: ``False``. | ||
|
|
||
| ``samesite`` | ||
| The 'SameSite' attribute of the cookie, can be either ``b"Strict"``, |
| ``samesite`` | ||
|
|
||
| A string representing the ``SameSite`` attribute of the cookie or | ||
| ``None``. If samesite is ``None`` no ``SameSite`` value will be sent |
There was a problem hiding this comment.
Are the various casing and markups of samesite and SameSite intentional?
Also are there two contexts or one for samesite/SameSite? Each context should use consistent markup.
There was a problem hiding this comment.
Yes. This is on purpose. One is a kwarg, the other is the attribute name in the RFC.
There was a problem hiding this comment.
OK, then should it be this for consistency and indicate that it is a kwarg?
``samesite``
There was a problem hiding this comment.
Also you switch between:
'SameSite'
and
``SameSite``
|
|
||
| A string representing the ``SameSite`` attribute of the cookie or | ||
| ``None``. If samesite is ``None`` no ``SameSite`` value will be sent | ||
| in the cookie. Should only be ``b"Strict"`` or ``b"Lax"`` |
There was a problem hiding this comment.
add period to end of sentence.
|
|
||
| These features are experimental and may change at any point in the future. | ||
|
|
||
| - The cookie API's now have the ability to set the SameSite attribute in both |
There was a problem hiding this comment.
APIs (this is neither possessive nor a conjunction)
Also see following comments about "SameSite" and "samesite".
| These features are experimental and may change at any point in the future. | ||
|
|
||
| - The cookie API's now have the ability to set the SameSite attribute in both | ||
| webob.cookies.make_cookie and webob.cookies.CookieProfile. |
There was a problem hiding this comment.
Should these be marked up with reST?
There was a problem hiding this comment.
No, this is in CHANGES.txt, I haven't marked any of the other things up either. I might add `` around them.
Merging master into #255, and will add docs in this PR too.