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

keycloak-auth-utils

Package Overview
Dependencies
Maintainers
2
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

keycloak-auth-utils - npm Package Compare versions

Comparing version 0.0.16 to 0.0.17

.travis.yml

7

config.js

@@ -124,4 +124,11 @@ /*!

this.publicKey += "-----END PUBLIC KEY-----\n";
/**
* If this is a Bearer Only application.
* @type {Boolean}
*/
this.bearerOnly = config['bearer-only'] || config.bearerOnly || false;
};
module.exports = Config;

29

grant-manager.js

@@ -25,2 +25,3 @@ /*!

var crypto = require('crypto');
var querystring = require('querystring');

@@ -131,12 +132,17 @@ var Form = require('./form');

console.log( "request.session", request.session );
var redirectUri = encodeURIComponent( request.session.auth_redirect_uri );
var queryObj = {
application_session_state: sessionId,
application_session_host: sessionHost,
code: code,
grant_type: 'authorization_code',
client_id: this.clientId,
redirect_uri: request.session.auth_redirect_uri
};
var params = querystring.stringify(queryObj);
var params = 'code=' + code + '&application_session_state=' + sessionId + '&redirect_uri=' + redirectUri + '&application_session_host=' + sessionHost;
var options = URL.parse( this.realmUrl + '/tokens/access/codes' );
var options = URL.parse( this.realmUrl + '/protocol/openid-connect/token' );
var protocol = http;
options.method = 'POST';
if ( options.protocol == 'https:' ) {
if ( options.protocol == 'https:' ) {
protocol = https;

@@ -147,7 +153,6 @@ } else {

options.headers = {
options.headers = {
'Content-Length': params.length,
'Content-Type': 'application/x-www-form-urlencoded',
'Authorization': 'Basic ' + new Buffer( this.clientId + ':' + this.secret ).toString('base64' ),
};
'Content-Type': 'application/x-www-form-urlencoded'
};

@@ -316,3 +321,5 @@ var request = protocol.request( options, function(response) {

var grantData = JSON.parse( rawData );
var grantData = rawData;
if (typeof rawData !== 'object')
grantData = JSON.parse( grantData );

@@ -319,0 +326,0 @@ var access_token;

{
"name": "keycloak-auth-utils",
"version": "0.0.16",
"version": "0.0.17",
"description": "General Keycloak Utilities",
"homepage": "http://keycloak.org",
"main": "index.js",
"scripts": {
"test": "node_modules/jasmine/bin/jasmine.js",
"prepublish": "./node_modules/nsp/bin/nsp check",
"build": "node_modules/grunt-cli/bin/grunt"
},
"author": "",
"author": {
"name": "Red Hat, Inc.",
"url": "http://keycloak.org"
},
"license": "Apache-2.0",

@@ -21,3 +26,4 @@ "devDependencies": {

"grunt-touch": "^0.1.0",
"jasmine": "^2.1.1"
"jasmine": "^2.1.1",
"nsp": "*"
},

@@ -24,0 +30,0 @@ "dependencies": {

@@ -11,3 +11,3 @@

jasmine.DEFAULT_TIMEOUT_INTERVAL = 10000;
var config = new Config();
var config = new Config('spec/keycloak.json');
manager = new GrantManager(config);

@@ -71,3 +71,3 @@ })

})
it( 'should be able to validate a valid token string', function(done) {

@@ -100,4 +100,4 @@ var originalAccessToken;

})
});
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