Skip to content
This repository has been archived by the owner on Nov 22, 2018. It is now read-only.

Expose cookie options via Antiforgery options #104

Closed
kichalla opened this issue Sep 14, 2016 · 5 comments
Closed

Expose cookie options via Antiforgery options #104

kichalla opened this issue Sep 14, 2016 · 5 comments
Assignees
Milestone

Comments

@kichalla
Copy link
Member

With the following commit, the path of the antiforgery's cookie token is set to always use the request's PathBase. Consider exposing the cookie's options via the AntiforgeryOptions to enable users to set it explicitly if they need to.

@rynowak
Copy link
Member

rynowak commented Sep 14, 2016

We don't want to expose cookie options in general, just the ability to either set Path globally, or have a boolean to ignore PathBase.

@Eilon
Copy link
Member

Eilon commented Oct 3, 2016

@rynowak so we want one or the other option? Or both?

@rynowak
Copy link
Member

rynowak commented Oct 3, 2016

We made the breaking change to use PathBase we need to expose something to override that behavior in case you wanted something different.

Some other discussion was discussed about exposing other cookie options as options.

@Eilon
Copy link
Member

Eilon commented Oct 6, 2016

Let's add a PathString? AntiforgeryOptions.CookiePath { get; set; } property.

If it's unset (i.e. null), the system will be smart and use the PathBase of the request. If it's set to anything else, the system will be smart and use what the user set.

@Eilon Eilon added the 1 - Ready label Oct 6, 2016
@Eilon
Copy link
Member

Eilon commented Oct 6, 2016

Please ensure the behavior is covered in the doc comment of the new property.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants