{"action":"closed","issue":{"url":"https://api.github.com/repos/springfox/springfox-demos/issues/17","repository_url":"https://api.github.com/repos/springfox/springfox-demos","labels_url":"https://api.github.com/repos/springfox/springfox-demos/issues/17/labels{/name}","comments_url":"https://api.github.com/repos/springfox/springfox-demos/issues/17/comments","events_url":"https://api.github.com/repos/springfox/springfox-demos/issues/17/events","html_url":"https://github.com/springfox/springfox-demos/issues/17","id":131935791,"number":17,"title":"authorization - httpauth.  How to do it right?","user":{"login":"ssrini","id":1236599,"avatar_url":"https://avatars.githubusercontent.com/u/1236599?v=3","gravatar_id":"","url":"https://api.github.com/users/ssrini","html_url":"https://github.com/ssrini","followers_url":"https://api.github.com/users/ssrini/followers","following_url":"https://api.github.com/users/ssrini/following{/other_user}","gists_url":"https://api.github.com/users/ssrini/gists{/gist_id}","starred_url":"https://api.github.com/users/ssrini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ssrini/subscriptions","organizations_url":"https://api.github.com/users/ssrini/orgs","repos_url":"https://api.github.com/users/ssrini/repos","events_url":"https://api.github.com/users/ssrini/events{/privacy}","received_events_url":"https://api.github.com/users/ssrini/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/springfox/springfox-demos/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-02-07T05:04:34Z","updated_at":"2016-02-13T10:41:54Z","closed_at":"2016-02-13T10:41:54Z","body":"This is snippet of my code from SwaggerConfiguration:\r\n\r\n   \tAuthorizationScope[] authScopes = new AuthorizationScope[1];\r\n        authScopes[0] = new AuthorizationScopeBuilder()\r\n                .scope(\"read\")\r\n                .description(\"Read Access\")\r\n                .build();\r\n\r\n        SecurityReference securityReference = SecurityReference.builder()\r\n                .reference(\"test\")\r\n                .scopes(authScopes)\r\n                .build();\r\n\r\n\t\tArrayList<SecurityReference> reference = new ArrayList(1);\r\n        reference.add(securityReference);\r\n\r\n        ArrayList<SecurityContext> securityContexts = new ArrayList(1);\r\n        securityContexts.add(SecurityContext.builder().securityReferences(reference).build());\r\n\r\n        ArrayList<SecurityScheme> auth = new ArrayList(1);\r\n        auth.add(new BasicAuth(\"test\"));\r\n\r\n        return new Docket(DocumentationType.SWAGGER_2)\r\n        \t.securitySchemes(auth)\r\n        \t.securityContexts(securityContexts)\r\n        \t.select()\r\n\t\t\t.apis(RequestHandlerSelectors.withClassAnnotation(Api.class)) \r\n            .paths(regex(\"/API/v2/.*\"))\r\n            .build()\r\n          \t.pathMapping(\"/\")\r\n          \t.protocols(protocols)\r\n          \t.apiInfo(metadata());\r\n    }\r\n\r\nWhen I use the generated json or directly access swagger-ui and try to hit the URL, the basic authentication used above does not seem to work.  Does not ask for credentials and also just keeps returning 0 although the URL is correct.\r\n\r\nAny hints on where this is going wrong?"}}