Huge News!Announcing our $40M Series B led by Abstract Ventures.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.4.0 to 1.5.0

3

HISTORY.md
## History
## 1.5.0
* Add async support and typings with typescript and convert to node-fetch (thanks @Rob9315)
## 1.4.0

@@ -4,0 +7,0 @@ * Add ability to request user from token refresh (thanks @ph0t0shop)

23

package.json
{
"name": "yggdrasil",
"version": "1.4.0",
"version": "1.5.0",
"author": "Zeke Sonxx <zeke@zekesonxx.com>",
"description": "Mojang authentication (Yggdrasil) client",
"files": [
"dist/**/*"
],
"scripts": {
"test": "mocha -R spec",
"pretest": "npm run lint",
"lint": "standard",
"fix": "standard --fix"
"pretest": "npm run lint && npm run build",
"prepublish": "npm run lint && npm run build",
"lint": "ts-standard",
"fix": "ts-standard --fix",
"build": "npx tsc"
},

@@ -26,3 +31,3 @@ "main": "./lib/index",

"dependencies": {
"phin": "^3.4.1",
"node-fetch": "^2.6.1",
"uuid": "^8.2.0"

@@ -32,6 +37,10 @@ },

"devDependencies": {
"mocha": "^7.0.1",
"@types/node": "^14.14.19",
"@types/node-fetch": "^2.5.8",
"@types/uuid": "^8.3.0",
"mocha": "^7.2.0",
"nock": "^13.0.2",
"standard": "^16.0.1"
"ts-standard": "^10.0.0",
"typescript": "^4.1.3"
}
}

@@ -31,13 +31,25 @@ # yggdrasil

requestUser: false //Optional. Request the user object to be included in response
}, function(err, data){});
}).then(
(response)=>{},
(error)=>{}
);
//Refresh an accessToken
ygg.refresh(oldtoken, clienttoken, true, function(err, newtoken, response body){});
ygg.refresh(oldAccessToken, clientToken, true).then(
({accessToken, clientToken, user?})=>{},
(error)=>{}
);
// Note that requestUser is an optional parameter. If set to true, it requests the user object from Mojang's authentication servers as well.
//Validate an accessToken
ygg.validate(token, function(err){});
ygg.validate(token).then(
(response)=>{},
(error)=>{}
);
//Invalidate all accessTokens
ygg.signout(username, password, function(err));
ygg.signout(username, password).then(
(response)=>{},
(error)=>{}
);
```

@@ -53,6 +65,12 @@

//Join a server (clientside)
yggserver.join(token, profile, serverid, sharedsecret, serverkey, function(err, response body){});
yggserver.join(token, profile, serverid, sharedsecret, serverkey).then(
(response)=>{},
(error)=>{}
);
//Join a server (serverside)
yggserver.hasJoined(username, serverid, sharedsecret, serverkey, function(err, client info){});
yggserver.hasJoined(username, serverid, sharedsecret, serverkey).then(
(clientInfo)=>{},
(error)=>{}
);
```

@@ -74,2 +92,3 @@ ## Proxy Support

* Note that the library is stateless when imported this way vs the CommonJS way.
* You have typings though ;D
*/

@@ -80,5 +99,11 @@ import { Client as ygg, Server as yggServ } from 'yggdrasil/es6'

ygg.validate(token, function(err){})
ygg.validate(token).then(
(response)=>{},
(error)=>{}
);
yggServ.join(token, profile, serverid, sharedsecret, serverkey, function(err, response body){});
yggServ.join(token, profile, serverid, sharedsecret, serverkey).then(
response=>{},
error=>{}
);
```

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