{"action":"created","issue":{"url":"https://api.github.com/repos/tuupola/slim-jwt-auth/issues/118","repository_url":"https://api.github.com/repos/tuupola/slim-jwt-auth","labels_url":"https://api.github.com/repos/tuupola/slim-jwt-auth/issues/118/labels{/name}","comments_url":"https://api.github.com/repos/tuupola/slim-jwt-auth/issues/118/comments","events_url":"https://api.github.com/repos/tuupola/slim-jwt-auth/issues/118/events","html_url":"https://github.com/tuupola/slim-jwt-auth/issues/118","id":322604028,"number":118,"title":"ignore rules not working","user":{"login":"benmajor","id":1329832,"avatar_url":"https://avatars0.githubusercontent.com/u/1329832?v=4","gravatar_id":"","url":"https://api.github.com/users/benmajor","html_url":"https://github.com/benmajor","followers_url":"https://api.github.com/users/benmajor/followers","following_url":"https://api.github.com/users/benmajor/following{/other_user}","gists_url":"https://api.github.com/users/benmajor/gists{/gist_id}","starred_url":"https://api.github.com/users/benmajor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benmajor/subscriptions","organizations_url":"https://api.github.com/users/benmajor/orgs","repos_url":"https://api.github.com/users/benmajor/repos","events_url":"https://api.github.com/users/benmajor/events{/privacy}","received_events_url":"https://api.github.com/users/benmajor/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-05-13T15:36:53Z","updated_at":"2018-05-14T08:59:51Z","closed_at":null,"author_association":"NONE","body":"Firstly, thanks for the great lib.\r\n\r\nUnfortunately, I seem to be hitting a bit of a problem, and I can't seem to figure out what's wrong. I have installed and configured the middleware as follows:\r\n\r\n```\r\n# Set up JWT middleware:\r\n$app->add(new Tuupola\\Middleware\\JwtAuthentication([\r\n    'ignore' => [ '/auth/login', '/auth/register' ],\r\n    'secret' => JWT_SECRET,\r\n    'secure' => true,\r\n    \r\n    'error'  => function ( $response, $arguments )\r\n    {\r\n        $json['statusCode'] = 401;\r\n        $json['message']    = 'Invalid auth token.';\r\n        \r\n        return $response->withStatus( $json['statusCode'] )->withJson( $json );\r\n    }\r\n]));\r\n```\r\n\r\nHowever, when attempting to access `https://url/api/auth/register`, we still get the `401 Unauthorized` response in Postman:\r\n\r\n![](https://i.imgur.com/L0CyAoj.png)\r\n\r\nPlease note that `/api` is a physical directory, not implemented with routes.\r\n\r\nWhat am I missing? Thanks."},"comment":{"url":"https://api.github.com/repos/tuupola/slim-jwt-auth/issues/comments/388746272","html_url":"https://github.com/tuupola/slim-jwt-auth/issues/118#issuecomment-388746272","issue_url":"https://api.github.com/repos/tuupola/slim-jwt-auth/issues/118","id":388746272,"user":{"login":"tuupola","id":21913,"avatar_url":"https://avatars0.githubusercontent.com/u/21913?v=4","gravatar_id":"","url":"https://api.github.com/users/tuupola","html_url":"https://github.com/tuupola","followers_url":"https://api.github.com/users/tuupola/followers","following_url":"https://api.github.com/users/tuupola/following{/other_user}","gists_url":"https://api.github.com/users/tuupola/gists{/gist_id}","starred_url":"https://api.github.com/users/tuupola/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tuupola/subscriptions","organizations_url":"https://api.github.com/users/tuupola/orgs","repos_url":"https://api.github.com/users/tuupola/repos","events_url":"https://api.github.com/users/tuupola/events{/privacy}","received_events_url":"https://api.github.com/users/tuupola/received_events","type":"User","site_admin":false},"created_at":"2018-05-14T08:59:51Z","updated_at":"2018-05-14T08:59:51Z","author_association":"OWNER","body":"Ok. It is a bug with how default parameters are handle. Thanks for the heads up!"}}
{"actor":{"display_login":"tuupola"}}