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

yggdrasil

Package Overview
Dependencies
Maintainers
3
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yggdrasil - npm Package Compare versions

Comparing version 1.6.1 to 1.7.0

4

HISTORY.md
## History
## 1.7.0
* Add new endpoint to invalidate all accessTokens using current valid accessToken and clientToken
* Fixed "call" function throwing an empty error message
## 1.6.1

@@ -4,0 +8,0 @@ * Properly escape the username

6

package.json
{
"name": "yggdrasil",
"version": "1.6.1",
"version": "1.7.0",
"author": "Zeke Sonxx <zeke@zekesonxx.com>",

@@ -31,4 +31,4 @@ "description": "Mojang authentication (Yggdrasil) client",

"devDependencies": {
"@types/node": "^16.0.0",
"@types/node-fetch": "^2.5.8",
"@types/node": "^17.0.4",
"@types/node-fetch": "^3.0.3",
"@types/uuid": "^8.3.0",

@@ -35,0 +35,0 @@ "mocha": "^9.0.0",

@@ -49,2 +49,8 @@ # yggdrasil

//Invalidate all accessTokens using a current valid accessToken and clientToken.
ygg.invalidate(accessToken, clientToken).then(
(response)=>{},
(error)=>{}
);
//Invalidate all accessTokens

@@ -51,0 +57,0 @@ ygg.signout(username, password).then(

@@ -66,2 +66,11 @@ const uuid = require('uuid')

}
/**
* Invalidates all access tokens using client/access token pair.
* @param {String} clientToken Client Token
* @param {String} accessToken Access Token
*/
async function invalidate (accessToken, clientToken) {
return await utils.call(moduleOptions?.host ?? defaultHost, 'invalidate', { accessToken, clientToken }, moduleOptions?.agent)
}
return {

@@ -71,3 +80,4 @@ auth: utils.callbackify(auth, 1),

signout: utils.callbackify(signout, 1),
validate: utils.callbackify(validate, 2)
validate: utils.callbackify(validate, 2),
invalidate: utils.callbackify(invalidate, 2)
}

@@ -74,0 +84,0 @@ }

@@ -35,3 +35,3 @@ const nf = require('node-fetch')

}
if (body?.error !== undefined) throw new Error(body?.errorMessage)
if (body?.error !== undefined) throw new Error(body?.errorMessage ?? body?.error)
return body

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