{"id":1605,"date":"2022-08-30T15:17:55","date_gmt":"2022-08-30T15:17:55","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2013\/11\/27\/voter-causing-500-error-rather-than-403-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:17:55","modified_gmt":"2022-08-30T15:17:55","slug":"voter-causing-500-error-rather-than-403-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/voter-causing-500-error-rather-than-403-collection-of-common-programming-errors\/","title":{"rendered":"Voter causing 500 error rather than 403-Collection of common programming errors"},"content":{"rendered":"<p>I&#8217;ve created a custom voter that denies access to my API if the request doesn&#8217;t contain a valid auth header. It&#8217;s based on a combination of two cookbook entries: http:\/\/symfony.com\/doc\/current\/cookbook\/security\/voters.html and http:\/\/symfony.com\/doc\/current\/cookbook\/security\/custom_authentication_provider.html<\/p>\n<p id=\"rop\"><small>Originally posted 2013-11-27 12:01:21. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve created a custom voter that denies access to my API if the request doesn&#8217;t contain a valid auth header. It&#8217;s based on a combination of two cookbook entries: http:\/\/symfony.com\/doc\/current\/cookbook\/security\/voters.html and http:\/\/symfony.com\/doc\/current\/cookbook\/security\/custom_authentication_provider.html Originally posted 2013-11-27 12:01:21.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1605","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1605","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=1605"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1605\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=1605"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=1605"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=1605"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}