Brightspace / D2L.Security.OAuth2

Brightspace OAuth 2.0 for C#
Apache License 2.0
7 stars 16 forks source link

Update OAuth2AuthorizeAttribute.cs #55

Closed lboyd closed 8 years ago

lboyd commented 8 years ago

Remove inheritance restriction to allow this attribute to be inherited from Abstract classes. Resulted from investigation of : https://rally1.rallydev.com/#/23525809118d/detail/userstory/57136951529 [MetronAPI] Add new default scope for Metron API routes

lboyd commented 8 years ago

Would be great to have @neverendingqs and @j3parker take a look if you have time...

j3parker commented 8 years ago

Weird, I'm having trouble finding this on MSDN. The default is true I take it? EDIT: found it, but not clear? https://msdn.microsoft.com/en-us/library/system.web.http.controllers.httpactiondescriptor.getcustomattributes(v=vs.118).aspx#M:System.Web.Http.Controllers.HttpActionDescriptor.GetCustomAttributes``1

j3parker commented 8 years ago

I can't find the source code for System.Web.Http though. I suppose if it works I'm cool with it. I'd usually just put inherit: true to avoid the confusion but nbd. Let me know if you've tried it and it works.

neverendingqs commented 8 years ago

+1 on explicitly calling it out (don't see a downside with being more verbose here).

Found the abstract class: https://github.com/ASP-NET-MVC/aspnetwebstack/blob/master/src/System.Web.Http/Controllers/HttpActionDescriptor.cs#L161.

lboyd commented 8 years ago

Yeah no problem from my side calling it out explicitly!

neverendingqs commented 8 years ago

:shipit: