{"id":18984464,"url":"https://github.com/danwakeem/loopback-swagger-auth","last_synced_at":"2025-11-11T08:03:52.235Z","repository":{"id":48007070,"uuid":"190776143","full_name":"Danwakeem/loopback-swagger-auth","owner":"Danwakeem","description":"Loopback component to add global auth to your swagger spec document","archived":false,"fork":false,"pushed_at":"2022-12-30T17:48:06.000Z","size":456,"stargazers_count":0,"open_issues_count":9,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-04-25T22:02:48.470Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Danwakeem.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-06-07T16:30:20.000Z","updated_at":"2019-06-07T17:04:37.000Z","dependencies_parsed_at":"2023-01-31T12:25:11.345Z","dependency_job_id":null,"html_url":"https://github.com/Danwakeem/loopback-swagger-auth","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Danwakeem%2Floopback-swagger-auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Danwakeem%2Floopback-swagger-auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Danwakeem%2Floopback-swagger-auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Danwakeem%2Floopback-swagger-auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Danwakeem","download_url":"https://codeload.github.com/Danwakeem/loopback-swagger-auth/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239993879,"owners_count":19730778,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T16:21:36.344Z","updated_at":"2025-11-11T08:03:52.130Z","avatar_url":"https://github.com/Danwakeem.png","language":"JavaScript","readme":"# Loopback Swagger Auth\n\n[![Build Status](https://travis-ci.com/Danwakeem/loopback-swagger-auth.svg?branch=master)](https://travis-ci.com/Danwakeem/loopback-swagger-auth)\n[![Coverage Status](https://coveralls.io/repos/github/Danwakeem/loopback-swagger-auth/badge.svg?branch=master)](https://coveralls.io/github/Danwakeem/loopback-swagger-auth?branch=master)\n\nThis loopback component to add global authentication to your swagger spec file.\n\n\u003e Note: This does not implement authentication it simply updates your swagger spec with global metadata. You can also technically use this to implement anything globally but I created it to add authentication to my spec file :)\n\n## Useage\n\n## Install\n`npm i loopback-swagger-auth --save`\n\n## Integrate with Loopback\nInclude the mixin in your `component-config.json` file\n\n```json\n{\n  \"loopback-swagger-auth\": {\n    \"securityDefinitions\": {\n      \"BearerAuth\": {\n        \"type\": \"apiKey\",\n        \"name\": \"Authorization\",\n        \"in\": \"header\"\n      }\n    },\n    \"security\": [\n      {\n        \"BearerAuth\": []\n      }\n    ]\n  }\n}\n```\n\nThe example above is adding an Authorization header for bearer token authentication. If you need more info on `securityDefinitions` in swagger 2.0 check swaggers [README](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#security-definitions-object).\n\n\n## Options\nAs mentioned above this component supports any global properties in the swagger 2.0 spec. Check the [README](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md) for more info on what options are available.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanwakeem%2Floopback-swagger-auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanwakeem%2Floopback-swagger-auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanwakeem%2Floopback-swagger-auth/lists"}