passport-bitbucket-token
Advanced tools
Comparing version 0.1.0 to 0.1.1
{ | ||
"name": "passport-bitbucket-token", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "Passport strategy for authenticating with Bitbucket access tokens using the OAuth 2.0 API.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -24,2 +24,5 @@ # passport-bitbucket-token | ||
The Bitbucket authentication strategy authenticate users using Bitbucket account and OAuthe 2 tokens. The strategy requires two parameters: `options` and `verify` callback. | ||
`options` are used to configure strategy. `verify` callback is function that accepts 4 arguments: `accessToken`, `refreshToken`, `profile`, `done`. `profile` is parsed Bitbucket profile. `done` is method which is called with user when `verify` method is finished. | ||
```js | ||
@@ -38,3 +41,10 @@ var BitbucketTokenStrategy = require('passport-bitbucket-token'); | ||
``` | ||
#### Options | ||
* `apiVersion` - Which version of Bitbucket API user want to use. Allowed values are [1.0](https://confluence.atlassian.com/bitbucket/user-endpoint-296092264.html) or [2.0](https://developer.atlassian.com/bitbucket/api/2/reference/resource/user). | ||
* `accessTokenField` - Name of HTTP header, body field or query parameter where access token is stored in request | ||
* `refreshTokenField` - Name of HTTP header, body field or query parameter where refresh token is stored in request | ||
* `passReqToCallback` - Should `verify` function received as first parameter `req` object | ||
### Authenticate User | ||
@@ -52,3 +62,25 @@ | ||
``` | ||
### Client Requests | ||
#### Sending access_token as a Query parameter | ||
```GET /auth/bitbucket?access_token=<TOKEN>``` | ||
#### Sending access token as an HTTP header | ||
``` | ||
GET /auth/bitbucket HTTP/1.1 | ||
Host: example.com | ||
Authorization: Bearer base64_access_token_string | ||
``` | ||
#### Sending access token as an HTTP body | ||
``` | ||
POST /auth/bitbucket HTTP/1.1 | ||
Host: example.com | ||
access_token=base64_access_token_string | ||
``` | ||
# License | ||
@@ -55,0 +87,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
85144
87
0