Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

passport-bitbucket-token

Package Overview
Dependencies
Maintainers
2
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

passport-bitbucket-token - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

2

package.json
{
"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 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc