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

AuthorizationContext conflicts with type in Microsoft.AspNet.Authorization #3979

Closed
davidfowl opened this issue Jan 24, 2016 · 7 comments
Closed
Assignees
Milestone

Comments

@davidfowl
Copy link
Member

We really shouldn't be conflicting with our own system. Can we rename the AuthorizationContext in MVC to FilterAuthorizationContext or something?

/cc @rynowak @Eilon @danroth27

@davidfowl
Copy link
Member Author

Scratch that, we have to rename it aspnet/Security#670 (comment)

@davidfowl
Copy link
Member Author

I wonder if we should have an MvcAuthorizationHandler<TRequirement>:

public abstract class MvcAuthorizationHandler<TRequirement> : AuthorizationHandler<TRequirement, Microsoft.AspNet.Mvc.Filters.AuthorizationContext> where TRequirement : IAuthorizationRequirement
{

}

/cc @blowdart

@blowdart
Copy link
Member

blowdart commented Jan 24, 2016 via email

@davidfowl
Copy link
Member Author

By default the resource that MVC passes to the AuthHandler its own AuthorizationContext (which is actually quite handy, see the issue linked). This would just be a shortcut for that.

@blowdart
Copy link
Member

blowdart commented Jan 24, 2016 via email

@davidfowl
Copy link
Member Author

@blowdart Sure we don't have to have a type, the user can just declare the MVC specific resource. No biggie.

@Eilon
Copy link
Member

Eilon commented Jan 25, 2016

So let's rename Microsoft.AspNetCore.Mvc.Filters.AuthorizationContext to Microsoft.AspNetCore.Mvc.Filters.AuthorizationFilterContext.

@Eilon Eilon added this to the 6.0.0-rc2 milestone Jan 25, 2016
javiercn added a commit that referenced this issue Jan 26, 2016
javiercn added a commit that referenced this issue Jan 26, 2016
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

4 participants