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

dnt-connect

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dnt-connect - npm Package Compare versions

Comparing version 3.0.1 to 3.0.2

10

index.js

@@ -258,2 +258,12 @@ 'use strict';

/*
*
* Express.js compatible middleare
*
* @param <string-utf8> type - "signon" or "bounce"
*
* @return <function> Express.js compatible middleare function
*
*/
C.prototype.middleware = function middleare(type) {

@@ -260,0 +270,0 @@ const that = this;

2

package.json
{
"name": "dnt-connect",
"version": "3.0.1",
"version": "3.0.2",
"description": "Node.JS library for DNT's single sign on service DNT Connect",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -39,2 +39,6 @@ # DNT Connect

**Imortant!** The key should be a `base64` representation of your secret key in
order for the `dnt-connect` package to decrypt the response from DNT Connect
properly.
### Bounce

@@ -60,2 +64,19 @@

### Middleare
For your convenience we have provided a fully compatible Express.js middeware
tha can `bounce` or do a full `signon` of your users. A full example can be
found in
[here](https://github.com/Turistforeningen/node-dnt-connect/blob/master/examples/server.js).
```javascript
app.get('/connect', connect.middleware('signon'), function getAuth(req, res) {
if (req.dntConnect.err) {
res.status(500).json({error: err.message});
} else {
res.status(200).json({data: req.dntConnect.data});
}
});
```
### Decrypt Response

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