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

cern-get-sso-cookie

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cern-get-sso-cookie

You give me a certificate, I give you a cookie you can use to query CERN services using SSO

  • 1.0.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
4
Maintainers
1
Weekly downloads
 
Created
Source

You give me a certificate, I give you a cookie you can use to query CERN services using SSO

Inspired in Python's implementation and Perl's implementation.

Install

    $ npm install cern-get-sso-cookie

Usage

Certificates must be passwordless

const axios = require('axios'); // Or whichever http agent you prefer
const getCookie = require('cern-get-sso-cookie');

const url_under_sso =
    'https://cmsoms.cern.ch/agg/api/v1/runs?sort=-run_number&page%5Blimit%5D=50&include=meta'; // Or any other API under SSO
const path_to_certificate = './path_to_usercert.pem';
const path_to_key = './path_to_userkey.pem';

// Get the cookie:
const cookie = getCookie({
    url: url_under_sso,
    certificate: path_to_certificate,
    key: path_to_key
});

const { data } = axios.get(url_under_sso, {
    headers: {
        Cookie: cookie
    }
});

Development

Running tests

    $ npm run test

FAQ

License

MIT © Fabio Espinosa

FAQs

Package last updated on 11 Jul 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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