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

passport-tequila

Package Overview
Dependencies
Maintainers
4
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

passport-tequila - npm Package Compare versions

Comparing version 0.2.0 to 1.0.0

.emacs.desktop

6

CHANGES.md

@@ -0,3 +1,9 @@

# Version 1.0.0
## Breaking change
- `protocol.fetchattributes` parameters signature goes from `(key, done)` to `(key, auth_key, done)`
- Add protocol 2.1 support
# Version 0.2.0
- Introduce configuration file for the `requestauth` form in the fake Tequila server

13

lib/passport-tequila/protocol.js

@@ -71,3 +71,4 @@ /**

service: this.service || ("Document " + req.originalUrl),
ca: this.ca
ca: this.ca,
mode_auth_check: "1"
};

@@ -110,6 +111,12 @@ if (this.require) {

* @param key The Tequila key (passed as key= URI parameter when redirected back from Tequila)
* @param auth_check The Tequila auth_check (passed as auth_check= URI parameter when redirected back from Tequila)
* @param {Function} done Called either as done(error), or done(null, raw_tequila_result_object)
*/
Protocol.prototype.fetchattributes = function (key, done) {
this._teqRequest(this.tequila_fetchattributes_path, {key: key}, function (error, result) {
Protocol.prototype.fetchattributes = function (key, auth_check, done) {
if ( auth_check instanceof Function ) {
const typeErrorMsg = "auth_check argument should not be a function since version 1.0.0. Please check the usage of the fetchattributes method."
throw new TypeError(errorMsg)
}
this._teqRequest(this.tequila_fetchattributes_path, {key: key, auth_check: auth_check}, function (error, result) {
if (error) {

@@ -116,0 +123,0 @@ debug("fetchattributes: Tequila error.");

@@ -47,5 +47,5 @@ /**

debug("Not authenticated at " + req.originalUrl);
if (req.query && req.query.key) {
debug("Looks like user is back from Tequila, with key=" + req.query.key);
protocol.fetchattributes(req.query.key, function (error, results) {
if (req.query && req.query.key && req.query.auth_check) {
debug("Looks like user is back from Tequila, with key=" + req.query.key + ', auth_check=' + req.query.auth_check);
protocol.fetchattributes(req.query.key, req.query.auth_check, function (error, results) {
if (error) {

@@ -59,4 +59,4 @@ next(error);

res.redirect(self.protocol.redirectUrl(req, url.parse(req.originalUrl).pathname));
} else if(req.query.key){
res.redirect(removeParam("key",self.protocol.redirectUrl(req, req.originalUrl)));
} else if(req.query.key || req.query.auth_check){
res.redirect(removeParam("auth_check", removeParam("key",self.protocol.redirectUrl(req, req.originalUrl))));
} else {

@@ -63,0 +63,0 @@ next();

{
"name": "passport-tequila",
"version": "0.2.0",
"version": "1.0.0",
"private": false,

@@ -5,0 +5,0 @@ "scripts": {

@@ -107,3 +107,4 @@ 'use strict';

TequilaServer.prototype.do_requestauth = function(req, res, next) {
const opts = this.opts
const defaultGroups = process.env.FAKE_TEQUILA_GROUPS || '';
const opts = this.opts;

@@ -110,0 +111,0 @@ res.send(`<html>

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