restlet / restlet-framework-java

The first REST API framework for Java
https://restlet.talend.com
649 stars 284 forks source link

Add support for SamSite cookie attribute #1376

Open PSpSynedra opened 3 years ago

PSpSynedra commented 3 years ago

This pull request adds support for the SameSite cookie attribute to:

It also adds tests for the added functionality via:

According to the description of SameSite cookies on MDN [1] the SameSite cookie attribute controls in requests a cookie is included in. The absence of the SameSite attribute might trigger warnings in modern browsers. Some browsers might event reject cookies with missing or wrongly set SameSite attributes.

Some scenarios might also require the SameSite attribute to be Strict so the corresponding cookie is only being sent in requests initiated by the same site.

The changes in modules/org.restlet.test/pom.xml where necessary for eclipse to match the packages with the folder structure.

[1] - https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite

thboileau commented 9 months ago

Hi @PSpSynedra Thanks a lot for your contribution! As a first-time contributor, do you mind to sign this JCA return it to jerome.louvel@qlik.com ?