{"_id":"@armyknife/backstage-gitlab-auth","name":"@armyknife/backstage-gitlab-auth","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@armyknife/backstage-gitlab-auth","version":"0.1.0","description":"GitLab authentication for Backstage","main":"dist/index.js","types":"dist/index.d.ts","license":"Apache-2.0","publishConfig":{"access":"public","main":"dist/index.js","types":"dist/index.d.ts"},"backstage":{"role":"frontend-plugin"},"scripts":{"build":"tsc","lint":"eslint src --ext .ts,.tsx","test":"jest","clean":"rm -rf dist","prepublishOnly":"yarn build"},"dependencies":{"@backstage/core-components":"^0.13.8","@backstage/core-plugin-api":"^1.8.0","@backstage/integration":"^1.7.1","@backstage/integration-react":"^1.1.21","@backstage/plugin-auth-backend":"^0.19.2","cross-fetch":"^4.0.0"},"peerDependencies":{"react":"^17.0.0 || ^18.0.0","react-dom":"^17.0.0 || ^18.0.0","react-router-dom":"6.0.0-beta.0 || ^6.3.0"},"devDependencies":{"@types/jest":"^29.0.0","@types/node":"^18.17.8","@types/react":"^18.0.0","eslint":"^8.0.0","jest":"^29.0.0","typescript":"~5.4.0"},"keywords":["backstage","gitlab","authentication"],"_id":"@armyknife/backstage-gitlab-auth@0.1.0","_nodeVersion":"22.14.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-VxBUoYkoEnpNW86tJ4DfWMgF4TEBCXs3f6+sd7gKrNbYhg8bDWIdegGrFBYTzJCpD1UQwyPxp0KHxTCiN3Qkuw==","shasum":"463ddbb0c7a8b208e22d39571bb6e92a48cdd37d","tarball":"https://registry.npmjs.org/@armyknife/backstage-gitlab-auth/-/backstage-gitlab-auth-0.1.0.tgz","fileCount":13,"unpackedSize":14252,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQC/qqFCl4kajoY7eIjxsDwz9J2rYiUAdrxjXsRjjEJPPQIhAP4FnJIYKBIdlVV0DlBiwmH+cT6337JLivI8Th0G/aPo"}]},"_npmUser":{"name":"armyknife","email":"backstage@devexparty.com"},"directories":{},"maintainers":[{"name":"armyknife","email":"backstage@devexparty.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/backstage-gitlab-auth_0.1.0_1740925228994_0.6732171967347742"},"_hasShrinkwrap":false}},"time":{"created":"2025-03-02T14:20:28.894Z","0.1.0":"2025-03-02T14:20:29.185Z","modified":"2025-03-02T14:20:29.408Z"},"maintainers":[{"name":"armyknife","email":"backstage@devexparty.com"}],"description":"GitLab authentication for Backstage","keywords":["backstage","gitlab","authentication"],"license":"Apache-2.0","readme":"# Backstage GitLab Authentication\n\nThis package provides GitLab authentication for Backstage.\n\n## Installation\n\n```bash\n# npm\nnpm install @armyknife/backstage-gitlab-auth\n\n# yarn\nyarn add @armyknife/backstage-gitlab-auth\n```\n\n## Usage\n\nCreate a file called `app-config.gitlab.yaml` in your Backstage root directory:\n\n```yaml\nauth:\n  environment: development\n  providers:\n    gitlab:\n      development:\n        clientId: ${GITLAB_CLIENT_ID}\n        clientSecret: ${GITLAB_CLIENT_SECRET}\n        # For self-hosted GitLab instances\n        audience: https://gitlab.example.com\n        # Optional: for self-hosted instances\n        baseUrl: https://gitlab.example.com\n        # Optional: for self-hosted instances\n        apiBaseUrl: https://gitlab.example.com/api/v4\n\n# Catalog configuration for GitLab\ncatalog:\n  providers:\n    gitlab:\n      myGitlabInstance:\n        host: gitlab.example.com # or gitlab.com for GitLab SaaS\n        token: ${GITLAB_TOKEN}\n        group: my-organization # Optional: filter by group\n        entityFilename: catalog-info.yaml # Optional: default is catalog-info.yaml\n```\n\nThen, in your `packages/app/src/App.tsx` file:\n\n```typescript\nimport { gitlabAuthApiRef, GitLabAuth } from '@armyknife/backstage-gitlab-auth';\n\n// Inside your createApp configuration:\napis: [\n  // ... other API factories\n  createApiFactory({\n    api: gitlabAuthApiRef,\n    deps: {\n      discoveryApi: discoveryApiRef,\n      oauthRequestApi: oauthRequestApiRef,\n      configApi: configApiRef,\n    },\n    factory: ({ discoveryApi, oauthRequestApi, configApi }) =>\n      GitLabAuth.create({\n        discoveryApi,\n        oauthRequestApi,\n        configApi,\n      }),\n  }),\n]\n```\n\n## Environment Variables\n\nYou'll need to set the following environment variables:\n\n```bash\nGITLAB_CLIENT_ID=your-gitlab-client-id\nGITLAB_CLIENT_SECRET=your-gitlab-client-secret\nGITLAB_TOKEN=your-gitlab-personal-access-token\n```\n\n## License\n\nApache-2.0\n","readmeFilename":"README.md"}