{"_id":"passport-gitlab2","_rev":"9-b8bae2672047a46ae813a020c247cbea","name":"passport-gitlab2","description":"GitLab authentication strategy for Passport.","dist-tags":{"latest":"5.0.0"},"versions":{"2.2.0":{"name":"passport-gitlab2","version":"2.2.0","description":"GitLab authentication strategy for Passport.","keywords":["passport","gitlab","auth","authn","authentication","identity"],"author":{"name":"Fabio Huser","email":"fabio@fh1.ch"},"repository":{"type":"git","url":"git+https://github.com/fh1ch/passport-gitlab2.git"},"bugs":{"url":"http://github.com/fh1ch/passport-gitlab2/issues"},"license":"MIT","main":"./lib","dependencies":{"passport-oauth2":"^1.3.0"},"devDependencies":{"chai":"^3.5.0","istanbul":"^0.4.3","jscs":"^3.0.3","jshint":"^2.9.2","mocha":"^1.21.5","mr-doc":"^3.2.1"},"engines":{"node":">= 0.12.0"},"scripts":{"test":"mocha test/*.spec.js"},"gitHead":"91b69547dc949e249b71140df98a1649d8981a3b","homepage":"https://github.com/fh1ch/passport-gitlab2#readme","_id":"passport-gitlab2@2.2.0","_shasum":"7380c364cdb4e8a9536ba02dd04ca97acb908da9","_from":".","_npmVersion":"3.6.0","_nodeVersion":"5.6.0","_npmUser":{"name":"fh1ch","email":"fabio@fh1.ch"},"dist":{"shasum":"7380c364cdb4e8a9536ba02dd04ca97acb908da9","tarball":"https://registry.npmjs.org/passport-gitlab2/-/passport-gitlab2-2.2.0.tgz","integrity":"sha512-hZ3YeYcpx0yCeEAqe+Emra6GaJfjN3RmIMz3Ko7DgsToD9D7sYqKfmOHpLN6dd9Ek6cBX/Xj0hxtWj/pepJeAw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDhW2OmidTlKj0ZTZqO4VXpy5hidE4glOHtvLNxqWxmJQIgMe+HCkzhiA/y49pgxOCmj0AzyisBsQqlVNeY6yVXL4Q="}]},"maintainers":[{"name":"fh1ch","email":"fabio@fh1.ch"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/passport-gitlab2-2.2.0.tgz_1462110484369_0.14371571643278003"},"directories":{}},"3.0.0":{"name":"passport-gitlab2","version":"3.0.0","description":"GitLab authentication strategy for Passport.","keywords":["passport","gitlab","auth","authn","authentication","identity"],"author":{"name":"Fabio Huser","email":"fabio@fh1.ch"},"repository":{"type":"git","url":"git+https://github.com/fh1ch/passport-gitlab2.git"},"bugs":{"url":"http://github.com/fh1ch/passport-gitlab2/issues"},"license":"MIT","main":"./lib","dependencies":{"passport-oauth2":"^1.3.0"},"devDependencies":{"chai":"^3.5.0","istanbul":"^0.4.3","jscs":"^3.0.3","jshint":"^2.9.2","mocha":"^1.21.5","mr-doc":"^3.2.1"},"engines":{"node":">= 0.12.0"},"scripts":{"test":"mocha test/*.spec.js"},"gitHead":"2dcd45fed084b6620792226943b2a64938500b6f","homepage":"https://github.com/fh1ch/passport-gitlab2#readme","_id":"passport-gitlab2@3.0.0","_shasum":"3cb020f078edb9ba664fdec9cbab2ccf95d38b2c","_from":".","_npmVersion":"3.10.8","_nodeVersion":"6.9.1","_npmUser":{"name":"fh1ch","email":"fabio@fh1.ch"},"dist":{"shasum":"3cb020f078edb9ba664fdec9cbab2ccf95d38b2c","tarball":"https://registry.npmjs.org/passport-gitlab2/-/passport-gitlab2-3.0.0.tgz","integrity":"sha512-yjKN42IyWky4LLaQBl45d3krjlLfvzD1hz6NqhnAFXtUUcRZwanQpRIGz8VsnUdTBHIgYSeTfgnMlJ6veZYQ0A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCzf6ZloC9aBl5LRb2K76SXyRySJC0xItTbyAtHORoXpgIgI551ME0raDxIHFeFd7C1bEjoym+6NBH5Bq+kvoS8z4E="}]},"maintainers":[{"name":"fh1ch","email":"fabio@fh1.ch"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/passport-gitlab2-3.0.0.tgz_1491148472214_0.8100238842889667"},"directories":{}},"4.0.0":{"name":"passport-gitlab2","version":"4.0.0","description":"GitLab authentication strategy for Passport.","keywords":["passport","gitlab","auth","authn","authentication","identity"],"author":{"name":"Fabio Huser","email":"fabio@fh1.ch"},"repository":{"type":"git","url":"git+https://github.com/fh1ch/passport-gitlab2.git"},"bugs":{"url":"http://github.com/fh1ch/passport-gitlab2/issues"},"license":"MIT","main":"./lib","dependencies":{"passport-oauth2":"^1.4.0"},"devDependencies":{"chai":"^4.1.2","istanbul":"^0.4.5","jscs":"^3.0.7","jshint":"^2.9.5","mocha":"^5.2.0","mr-doc":"^3.2.1"},"engines":{"node":">= 0.12.0"},"scripts":{"test":"mocha test/*.spec.js"},"gitHead":"4979fff56e54b535178e7e252b3abcbe4ae42c42","homepage":"https://github.com/fh1ch/passport-gitlab2#readme","_id":"passport-gitlab2@4.0.0","_npmVersion":"5.3.0","_nodeVersion":"8.4.0","_npmUser":{"name":"fh1ch","email":"fabio@fh1.ch"},"dist":{"integrity":"sha512-C/8/L8piHwv57J6fY/MzsEJc8yCkgsyBSzMWxfTfEHRvCaTkD08vJ5b/txydKrWrRPl4MHuZfisFnKlZHmq4yw==","shasum":"08de8b54d58cbe6f22f577f977f7874df3c26efb","tarball":"https://registry.npmjs.org/passport-gitlab2/-/passport-gitlab2-4.0.0.tgz","fileCount":7,"unpackedSize":12518,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbHYiBCRA9TVsSAnZWagAAxnAP/2ap4N1SHAthO0Glrfo4\nWF40AEQ1MWd/oIro2F4WHXKcp4inTJPusmaK/0wUrJpmzy/2r0lNC/TXiIsi\nGK49Pe+WMWLNxHkCinaMgBaPMB1PfCZp4bJXLtrRyAO/2qGeyXZZHGHuKiGp\n62mCLQ5Q/f39KmI9Ilxjq8UN2Az9xHg58qaNEtYpnG4IILXJTUQC8PtyW38f\n0uVb2rj5KDbzfvYGZsyqQ+sEh6zWTLghepqkSn9QJNNESphcbp0dFpp4U8tH\ng2vSZ8J22uxDqGbnJX8jecj6mebOQQ9TrTXZYsOTmMKI33SVxhZqaxs0S2qO\n1T5p/1TXzAdiqLP//A6I6pgAFH3wMOSg4J0/qUqB2Ypr+mIKJAgxqlHT38J2\n80y2Z5b+IYYxMMQyFEOQmCdTj1wtngD8JfQBwfU0KXmN7e2W36NzKLe/CkYa\nD4uQllGrDssp7p8NilstjngrIvi77ptMrEKiTPimtUuZMMwgdoI2lV4mHM3I\nN0KI7x09LdijmdrFYNQjhRnae0mLkqZ7fD+afS9G2fNWcjes2VmqnNtSS/Mg\nSUw3ZeeH2TQ2Q7HGjw3GN9Qbu2s5Kco4fpsf/VSZ5KyPQav5Pjoye6aGXYAV\nIkBgZ39XYjOOjGKv/8igAcCJKKcO91ej9b6t3d9YadngymO2cYz0nCh47gaA\nOV/I\r\n=WBnZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDM+MmjXpdkrjZu29REKC8ut8D3NhBJ6NC3TSeEv1XfqwIhAOqgm0Nnjhat+aK7CYwUoL32SoByyn34+Z2Wp1DUfEOe"}]},"maintainers":[{"name":"fh1ch","email":"fabio@fh1.ch"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/passport-gitlab2_4.0.0_1528662143703_0.8101691555480228"},"_hasShrinkwrap":false},"5.0.0":{"name":"passport-gitlab2","version":"5.0.0","description":"GitLab authentication strategy for Passport.","keywords":["passport","gitlab","auth","authn","authentication","identity"],"author":{"name":"Fabio Huser","email":"fabio@fh1.ch"},"repository":{"type":"git","url":"git+https://github.com/fh1ch/passport-gitlab2.git"},"bugs":{"url":"http://github.com/fh1ch/passport-gitlab2/issues"},"license":"MIT","main":"./lib","dependencies":{"passport-oauth2":"^1.4.0"},"devDependencies":{"chai":"^4.2.0","eslint":"^5.13.0","eslint-config-google":"^0.12.0","mocha":"^5.2.0","nyc":"^13.2.0"},"engines":{"node":">= 6.0.0"},"scripts":{"test":"mocha test/*.spec.js"},"gitHead":"4238b67438c1f1a7050908556ac010bc319b734a","homepage":"https://github.com/fh1ch/passport-gitlab2#readme","_id":"passport-gitlab2@5.0.0","_nodeVersion":"8.9.3","_npmVersion":"6.7.0","dist":{"integrity":"sha512-cXQMgM6JQx9wHVh7JLH30D8fplfwjsDwRz+zS0pqC8JS+4bNmc1J04NGp5g2M4yfwylH9kQRrMN98GxMw7q7cg==","shasum":"ea37e5285321c026a02671e87469cac28cce9b69","tarball":"https://registry.npmjs.org/passport-gitlab2/-/passport-gitlab2-5.0.0.tgz","fileCount":6,"unpackedSize":12716,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcX+ceCRA9TVsSAnZWagAAz3AP/06e5wMXEiac7GSl1xhA\nqoOxeg+bAIsO2n+ZJkl3hbG7SnBW+XhEmfc9TSeer9aeFNTR+hd9W2tZ3XLd\n/9V6hvjY+M8x2DaJdRDApeTkvVsAdb6pd3UET8GEegzw9/B3eOGvntqABiiY\nCRXBfjvMDQAlUCF6o5vcKSr//+3+WfLMrFLYmy8sBDkddGLPqRe2siLiQFPp\n7IxvFCYX5mK+zO/Tkyxgl1JQ3pbA1hX/+/A+2pWRl13qNXM0uXHLMbOg6CNr\n8L9sF/e5RRElJr4csOVRUMPBx7M5XIvN4+P2eJIQdvIlPohV+bWeL5QonSpq\nVYxQbFv7iGEQJaYnwHvUe+ES6bYEtH25Ve1TQwObDAWzvgipoYziMxC2Ne3E\n24wmXRrYwbFY+9aYVvgxK58X6mdshigr79P40V7Fjk4xCr5ZVOuoNLRzITKs\n+k2Vl/f+wKhVNJ1l7WL9+EEE57Q1ZRk/0+R94NM5eGxSRUT5jvrhgUcbGcu+\nstovpGmAxvyxmCs2ctArLSuktO/Fy4ZwP2LSD/MKneJiLpiup0l3wuRz1aQN\nQFYYftKuXuKcVAcgumEojePkTomPgPQt0RJ57TxDoDGtkwswdNJGjjyFI7p5\nejo8YY/KuT94lqXxGRIJ2tDgP5ew+YYAVcNCco37yAD5j+OA1PE4eGhBGPOj\nR0Gl\r\n=WoKw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCtLLttuKzptmobmDTLQPmHpryYiH3HWCRKLr+iYXptrgIgcJ4s+ul9ilqZp+PHn76BzEtHZwJLAh4cN4COER77npw="}]},"maintainers":[{"name":"fh1ch","email":"fabio@fh1.ch"}],"_npmUser":{"name":"fh1ch","email":"fabio@fh1.ch"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/passport-gitlab2_5.0.0_1549788957765_0.39629012598987634"},"_hasShrinkwrap":false}},"readme":"# passport-gitlab2\n\nThe original Passport-GitLab module has not been maintained for a long time.\nDue to the unclear license situation and issues in the code, this library was\nrewritten based on Passport-Facebook and published under the MIT license.\n\n[![npm version](https://badge.fury.io/js/passport-gitlab2.svg)](http://badge.fury.io/js/passport-gitlab2)\n[![Build Status](https://travis-ci.org/fh1ch/passport-gitlab2.svg?branch=master&style=flat)](https://travis-ci.org/fh1ch/passport-gitlab2)\n[![Coverage Status](https://coveralls.io/repos/fh1ch/passport-gitlab2/badge.svg?branch=master)](https://coveralls.io/r/fh1ch/passport-gitlab2?branch=master)\n[![Code Climate](https://codeclimate.com/github/fh1ch/passport-gitlab2/badges/gpa.svg)](https://codeclimate.com/github/fh1ch/passport-gitlab2)\n[![Dependency Status](https://david-dm.org/fh1ch/passport-gitlab2.svg?theme=shields.io)](https://david-dm.org/fh1ch/passport-gitlab2)\n\n[Passport](http://passportjs.org/) strategy for authenticating with\n[GitLab](https://gitlab.com/) using the OAuth2 authentication provider service.\n\nThis module lets you authenticate using GitLab in your Node.js applications.\nBy plugging into Passport, GitLab authentication can be easily and\nunobtrusively integrated into any application or framework that supports\n[Connect](http://www.senchalabs.org/connect/)-style middleware, including\n[Express](http://expressjs.com/).\n\n## Install\n\n```bash\n$ npm install passport-gitlab2\n```\n\n## Usage\n\nPassport-GitLab requires GitLab 9.0.0 or higher to work. Before using the OAuth2\nauthentication provider service, you have register a new application in your\n[user profile](https://gitlab.com/profile/applications) or in the administrator\nportal. GitLab will then issue an application ID and a secret, which need to be\nprovided to the strategy. You will also need to configure a redirect URI which\nmatches the route in your application.\n\n#### Configure Strategy\n\nThe GitLab authentication strategy authenticates users using a GitLab\naccount and OAuth 2.0 tokens. The app ID and secret obtained when creating an\napplication are supplied as options when creating the strategy. The strategy\nalso requires a `verify` callback, which receives the access token and optional\nrefresh token, as well as `profile` which contains the authenticated user's\nGitLab profile. The `verify` callback must call `cb` providing a user to\ncomplete authentication.\n\n```js\npassport.use(new GitLabStrategy({\n    clientID: GITLAB_APP_ID,\n    clientSecret: GITLAB_APP_SECRET,\n    callbackURL: \"http://localhost:3000/auth/gitlab/callback\"\n  },\n  function(accessToken, refreshToken, profile, cb) {\n    User.findOrCreate({gitlabId: profile.id}, function (err, user) {\n      return cb(err, user);\n    });\n  }\n));\n```\n\n#### Authenticate Requests\n\nUse `passport.authenticate()`, specifying the `'gitlab'` strategy, to\nauthenticate requests.\n\nFor example, as route middleware in an [Express](http://expressjs.com/)\napplication:\n\n```js\napp.get('/auth/gitlab', passport.authenticate('gitlab'));\n\napp.get('/auth/gitlab/callback',\n  passport.authenticate('gitlab', {\n    failureRedirect: '/login'\n  }),\n  function(req, res) {\n    // Successful authentication, redirect home.\n    res.redirect('/');\n  });\n```\n\n## FAQ\n\n##### How do I use my own GitLab instance rather than gitlab.com?\n\nPassport-GitLab automatically uses [GitLab.com](http://gitlab.com/) as\nauthentication endpoint when not configured otherwise. You can use the `baseURL`\nparameter to point to any other GitLab instance as following:\n\n```js\nnew GitLabStrategy({\n  clientID: GITLAB_APP_ID,\n  clientSecret: GITLAB_APP_SECRET,\n  callbackURL: \"http://localhost:3000/auth/gitlab/callback\",\n  baseURL: \"https://gitlab.example.com/\"\n}), ...)\n```\n\nAll URLs (e.g. token-url, authorization-url, profile-url) are automatically\nadapted to utilize the configured instance. You can of course overwrite all\nURLs manually if needed.\n\n##### How do I change permissions / scope when obtaining a user profile?\n\nGitLab supports multiple scopes at the moment like `read_user` and `api`.\nBy default, the `read_user` scope is used. Changing the OAuth2 scope to\n`api` works as following:\n\n```js\napp.get('/auth/gitlab',\n  passport.authenticate('gitlab', {\n    scope: ['api']\n  }));\n```\n\nMore information can be found in the [official GitLab documentation](https://docs.gitlab.com/ce/integration/oauth_provider.html#authorized-applications).\n\n## Contributing\n\nWe appreciate contributions in several forms, e.g. documentation, testing,\ncoding, issues, etc. Please follow the best practice contribution guide as\nmentioned below when submitting code changes:\n\n#### Code style\n\nThis module uses the [Google JavaScript Code-Style](https://google.github.io/styleguide/javascriptguide.xml)\nand enforces it using [JSCS](http://jscs.info/) as additional linter beneath\n[JSHint](http://jshint.com/). These measures ensuring a high level of code\nquality and easy maintainability of it. You can test if your changes comply\nwith the code style by executing:\n\n```bash\n$ make lint\n```\n\n#### Tests\n\nThe test suite is located in the `test/` directory. All new features are\nexpected to have corresponding test cases. Ensure that the complete test suite\npasses by executing:\n\n```bash\n$ make test\n```\n\n#### Coverage\n\nThe test suite covers 100% of the code base. All new feature development is\nexpected to maintain that level. Coverage reports can be viewed by executing:\n\n```bash\n$ make coverage-view\n```\n\n## License\n\n[The MIT License](http://opensource.org/licenses/MIT)\n\nCopyright (c) 2016-2019 Fabio Huser <fabio@fh1.ch>\n\nCopyright (c) 2011-2016 Jared Hanson <[http://jaredhanson.net/](http://jaredhanson.net/)>\n","maintainers":[{"name":"fh1ch","email":"fabio@fh1.ch"}],"time":{"modified":"2022-06-23T12:39:45.537Z","created":"2016-05-01T13:48:06.786Z","2.2.0":"2016-05-01T13:48:06.786Z","3.0.0":"2017-04-02T15:54:32.983Z","4.0.0":"2018-06-10T20:22:23.787Z","5.0.0":"2019-02-10T08:55:57.879Z"},"homepage":"https://github.com/fh1ch/passport-gitlab2#readme","keywords":["passport","gitlab","auth","authn","authentication","identity"],"repository":{"type":"git","url":"git+https://github.com/fh1ch/passport-gitlab2.git"},"author":{"name":"Fabio Huser","email":"fabio@fh1.ch"},"bugs":{"url":"http://github.com/fh1ch/passport-gitlab2/issues"},"license":"MIT","readmeFilename":"README.md","users":{"richiebres":true,"rbecheras":true}}