{"action":"created","issue":{"url":"https://api.github.com/repos/ahopkins/sanic-jwt/issues/129","repository_url":"https://api.github.com/repos/ahopkins/sanic-jwt","labels_url":"https://api.github.com/repos/ahopkins/sanic-jwt/issues/129/labels{/name}","comments_url":"https://api.github.com/repos/ahopkins/sanic-jwt/issues/129/comments","events_url":"https://api.github.com/repos/ahopkins/sanic-jwt/issues/129/events","html_url":"https://github.com/ahopkins/sanic-jwt/issues/129","id":351536666,"node_id":"MDU6SXNzdWUzNTE1MzY2NjY=","number":129,"title":"Disabling protection at runtime","user":{"login":"rubik","id":238549,"node_id":"MDQ6VXNlcjIzODU0OQ==","avatar_url":"https://avatars2.githubusercontent.com/u/238549?v=4","gravatar_id":"","url":"https://api.github.com/users/rubik","html_url":"https://github.com/rubik","followers_url":"https://api.github.com/users/rubik/followers","following_url":"https://api.github.com/users/rubik/following{/other_user}","gists_url":"https://api.github.com/users/rubik/gists{/gist_id}","starred_url":"https://api.github.com/users/rubik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rubik/subscriptions","organizations_url":"https://api.github.com/users/rubik/orgs","repos_url":"https://api.github.com/users/rubik/repos","events_url":"https://api.github.com/users/rubik/events{/privacy}","received_events_url":"https://api.github.com/users/rubik/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-08-17T10:11:08Z","updated_at":"2018-08-17T13:07:25Z","closed_at":null,"author_association":"NONE","body":"I have checked the docs but it does not seem that my use case is mentioned, so that's why I'm opening an issue.\r\n\r\nWe have an API server that is used by our users and needs JWT protection. However, we also have a secondary instance of the API server that runs in our internal network and we would like to disable protection there. The API is otherwise the same. It would be best if this could be done in some dynamic way so that we could still use the same code base and push updates to both versions.\r\n\r\nI think that even if this is not supported it can be done by creating a decorator that wraps `protected` in some way, am I correct?\r\n\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/ahopkins/sanic-jwt/issues/comments/413859555","html_url":"https://github.com/ahopkins/sanic-jwt/issues/129#issuecomment-413859555","issue_url":"https://api.github.com/repos/ahopkins/sanic-jwt/issues/129","id":413859555,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMzg1OTU1NQ==","user":{"login":"ahopkins","id":166269,"node_id":"MDQ6VXNlcjE2NjI2OQ==","avatar_url":"https://avatars1.githubusercontent.com/u/166269?v=4","gravatar_id":"","url":"https://api.github.com/users/ahopkins","html_url":"https://github.com/ahopkins","followers_url":"https://api.github.com/users/ahopkins/followers","following_url":"https://api.github.com/users/ahopkins/following{/other_user}","gists_url":"https://api.github.com/users/ahopkins/gists{/gist_id}","starred_url":"https://api.github.com/users/ahopkins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahopkins/subscriptions","organizations_url":"https://api.github.com/users/ahopkins/orgs","repos_url":"https://api.github.com/users/ahopkins/repos","events_url":"https://api.github.com/users/ahopkins/events{/privacy}","received_events_url":"https://api.github.com/users/ahopkins/received_events","type":"User","site_admin":false},"created_at":"2018-08-17T13:07:25Z","updated_at":"2018-08-17T13:07:25Z","author_association":"OWNER","body":"Sorry.... I'm now at a computer so I cannot provide a snippet.\r\n\r\nthere probably is a need for a built in configuration value. And with the new runtime configuration calls (https://sanic-jwt.readthedocs.io/en/latest/pages/configuration.html#configuration-class) this would be a perfect scenario. \r\n\r\nNext week I'll probably be pushing some changes and getting a new release ready. So maybe I'll add this directly into the protected decorator.\r\n"}}
{"actor":{"display_login":"ahopkins"}}