Open Closed

Authorize Attribute Not Working in API Token Based #2018


0
thanapoomc created

I created Token based API by doing following link: #384@e1dc8ca5-47b2-4d5b-8523-b491e41be940

And I tested my Controller by mark Authorize Attribute in GetHellox action in Util controller. I send request without Authorize header. But those still not filter Authorize.

I don't know some thing wrong. Please help me find solution. Here my source code. <a class="postlink" href="https://gist.github.com/blinkster678/1f7b7b7d5f398275ffabb0024cbab500">https://gist.github.com/blinkster678/1f ... 024cbab500</a> Request result with postman <a class="postlink" href="https://drive.google.com/file/d/0B7ZOKTayIG95NzFtazJ3WllXdm8/view?usp=sharing">https://drive.google.com/file/d/0B7ZOKT ... sp=sharing</a>

Thank you.


1 Answer(s)
  • 0
    ismcagdas created
    Support Team

    Hi,

    You should use AbpApiAuthorize, see <a class="postlink" href="http://aspnetboilerplate.com/Pages/Documents/Web-API-Controllers#authorization">http://aspnetboilerplate.com/Pages/Docu ... horization</a>