New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

atlassian-connect-auth

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

atlassian-connect-auth - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

.eslintrc.json

8

lib/Addon.js

@@ -6,3 +6,3 @@ const jwt = require('atlassian-jwt')

class Addon {
constructor({ product, baseUrl }) {
constructor ({ product, baseUrl }) {
this.product = product

@@ -12,3 +12,3 @@ this.baseUrl = baseUrl

async install(req, { loadCredentials, saveCredentials }) {
async install (req, { loadCredentials, saveCredentials }) {
const id = util.extractId(req)

@@ -46,3 +46,3 @@ const token = util.extractToken(req, this.product)

async auth(req, { skipQsh, loadCredentials }) {
async auth (req, { skipQsh, loadCredentials }) {
const token = util.extractToken(req, this.product)

@@ -70,2 +70,2 @@ if (!token) {

module.exports = Addon
module.exports = Addon
const jwt = require('atlassian-jwt')
const AuthError = require('./AuthError')
function extractToken(req) {
const token = req.headers['authorization'] || ''
function extractToken (req) {
const token = req.headers.authorization || req.query.jwt || ''
return token.replace(/^JWT /, '')

@@ -51,3 +51,3 @@ }

validateQsh,
validateToken,
}
validateToken
}
{
"name": "atlassian-connect-auth",
"version": "1.0.1",
"description": "",
"version": "1.0.2",
"description": "Helper for handling webhooks from Atlassian products",
"main": "lib/index.js",

@@ -40,3 +40,3 @@ "directories": {

"eslint-plugin-import": "^2.8.0",
"eslint-plugin-node": "^5.2.0",
"eslint-plugin-node": "^5.2.1",
"eslint-plugin-promise": "^3.6.0",

@@ -43,0 +43,0 @@ "eslint-plugin-standard": "^3.0.1"

@@ -15,3 +15,3 @@ # atlassian-connect-auth

await addon.install(req, {
loadCredentials: clientKey => model.Credentials.findOne({ clientKey }),
loadCredentials: clientKey => model.Credentials.findOne({ where: { clientKey } }),
saveCredentials: (clientKey, newCredentials, storedCredentials) => {

@@ -41,3 +41,3 @@ if (storedCredentials) {

await addon.auth(req, {
loadCredentials: clientKey => model.Credentials.findOne({ clientKey })
loadCredentials: clientKey => model.Credentials.findOne({ where: { clientKey } })
})

@@ -44,0 +44,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