{"name":"yggdrasil","version":"1.7.0","author":{"name":"Zeke Sonxx","email":"zeke@zekesonxx.com"},"description":"Mojang authentication (Yggdrasil) client","scripts":{"test":"mocha -R spec","pretest":"npm run lint","lint":"standard","fix":"standard --fix"},"main":"./src/index.js","repository":{"type":"git","url":"git+https://github.com/PrismarineJS/node-yggdrasil.git"},"bugs":{"url":"https://github.com/PrismarineJS/node-yggdrasil/issues"},"keywords":["minecraft","yggdrasil","authentication"],"dependencies":{"node-fetch":"^2.6.1","uuid":"^8.2.0"},"license":"MIT","devDependencies":{"@types/node":"^17.0.4","@types/node-fetch":"^3.0.3","@types/uuid":"^8.3.0","mocha":"^9.0.0","nock":"^13.0.2","standard":"^16.0.3"},"gitHead":"aeac7be2bb852f0f27b43593b1807f55aeebca6e","homepage":"https://github.com/PrismarineJS/node-yggdrasil#readme","_id":"yggdrasil@1.7.0","_nodeVersion":"14.0.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-QBIo5fiNd7688G3FqXXYGr36uyrYzczlNuzpWFy2zL3+R+3KT2lF+wFxm51synfA3l3z6IBiGOc1/EVXWCYY1Q==","shasum":"bfe9fabfd3600078cd1fa0d4445bf6fc6bf46149","tarball":"http://registry-npm.ywwl.com/yggdrasil/download/yggdrasil-1.7.0.tgz","fileCount":14,"unpackedSize":28203,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiQNOuACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrlWRAAoJAx/cZxmbV3ZTFP3IfyHyNKyZAJCfD6gdP/xCwAOIA8ogdF\r\nImr2s8P8QTnksU9BEdLuzOtwKJWAjOwl6ANlobIxiHNTbXRFZUTRU+MNW3Kp\r\n8Br+vo8KL8B+XQcjjmGrY5hlFSAPl3k5SmWSQEiJ+MmltzlxOv4tUlSvtjIV\r\nQNvrZ4VPqwiZ3GHWa0lcWAI0qg1fIJwaHiMGGkTKyAF+33yR1nIU3ePOoiPK\r\n9T2Siuy8OzXGBeZ7MmJw/h42Fd2Fo0YTzlskew1EJ7UOuWtAgX/htQaE5vqu\r\naDcU5AayAH+1aUBcIUQv3Bv51phjJ6dd7cSBae1D2gP+K0Y/Lvp7Hjgu1l1q\r\nSm/pMK/Ag6mpjkWqIB0sBVV+iKoizU0sf+gYXkkD9uJh1Ml4oA24sLtIFeS1\r\ngrvoRBmpQr3lSAzTO7pINlJYtGpsuBJC/gOm8tGjBD1lSdrXgEkVZlCb2SyS\r\nPZv/DIEr1ydbBgXAz599g8NcS/NooaCjJVg8Pi7TQbro7wlHa9Hw1cRL023N\r\nr4PcsPdcx+Xuih2Abvoj3Q4qmHOJ0P+KpDmjQfppiT3Xfph93YoLePH+ZZUd\r\ndmXN4Pma5CC+1Csbq4Zy9HLftsv6PDTvoUynFRrMQxRnzUAzqE1soAD/O+AP\r\nErWucAtnRDEOfVDeqmBFI+lLZ8axEfW3MFM=\r\n=Bgzb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGDMeL2KrF3k/NWLzhmyCL8vrMoY/HkuQF+/AEgXZFKiAiAP6hE7H5xW8/0W1bV8RMeiWxTQWAq1A4EJEIEYcQechQ=="}],"size":7521,"noattachment":false,"key":"/yggdrasil/-/yggdrasil-1.7.0.tgz"},"_npmUser":{"name":"rom1504","email":"romain.rom1@gmail.com"},"directories":{},"maintainers":[{"name":"rom1504","email":"romain.rom1@gmail.com"},{"name":"zekesonxx","email":"zeke@zekesonxx.com"},{"name":"wvffle","email":"casper@wvffle.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/yggdrasil_1.7.0_1648415662718_0.2702085884305636"},"_hasShrinkwrap":false,"readme":"# yggdrasil\n[![NPM version](https://img.shields.io/npm/v/yggdrasil.svg)](http://npmjs.com/package/yggdrasil)\n[![Build Status](https://github.com/PrismarineJS/node-yggdrasil/workflows/CI/badge.svg)](https://github.com/PrismarineJS/node-yggdrasil/actions?query=workflow%3A%22CI%22)\n[![Discord](https://img.shields.io/badge/chat-on%20discord-brightgreen.svg)](https://discord.gg/GsEFRM8)\n[![Gitter](https://img.shields.io/badge/chat-on%20gitter-brightgreen.svg)](https://gitter.im/PrismarineJS/general)\n[![Irc](https://img.shields.io/badge/chat-on%20irc-brightgreen.svg)](https://irc.gitter.im/)\n\n[![Try it on gitpod](https://img.shields.io/badge/try-on%20gitpod-brightgreen.svg)](https://gitpod.io/#https://github.com/PrismarineJS/node-yggdrasil)\n\nA Node.js client for doing requests to yggdrasil, the Mojang authentication system, used for Minecraft and Scrolls.\n\n# Usage\n    $ npm install yggdrasil\n\n## Client\n```js\n//init\nconst ygg = require('yggdrasil')({\n  //Optional settings object\n  host: 'https://authserver.mojang.com' //Optional custom host. No trailing slash.\n});\n\n//Authenticate a user\nygg.auth({\n  token: '', //Optional. Client token.\n  agent: '', //Agent name. Defaults to 'Minecraft'\n  version: 1, //Agent version. Defaults to 1\n  user: '', //Username\n  pass: '', //Password\n  requestUser: false //Optional. Request the user object to be included in response\n}).then(\n  (response)=>{},\n  (error)=>{}\n);\n\n//Refresh an accessToken\nygg.refresh(oldAccessToken, clientToken, true).then(\n  ({accessToken, clientToken, user?})=>{},\n  (error)=>{}\n);\n// Note that requestUser is an optional parameter. If set to true, it requests the user object from Mojang's authentication servers as well.\n\n//Validate an accessToken\nygg.validate(token).then(\n  (response)=>{},\n  (error)=>{}\n);\n\n//Invalidate all accessTokens using a current valid accessToken and clientToken.\nygg.invalidate(accessToken, clientToken).then(\n  (response)=>{},\n  (error)=>{}\n);\n\n//Invalidate all accessTokens\nygg.signout(username, password).then(\n  (response)=>{},\n  (error)=>{}\n);\n```\n\n## Server\n```js\nconst yggserver = require('yggdrasil').server({\n  //Optional settings object\n  host: 'https://authserver.mojang.com' //Optional custom host. No trailing slash.\n});\n\n//Join a server (clientside)\nyggserver.join(token, profile, serverid, sharedsecret, serverkey).then(\n  (response)=>{},\n  (error)=>{}\n);\n\n//Join a server (serverside)\nyggserver.hasJoined(username, serverid, sharedsecret, serverkey).then(\n  (clientInfo)=>{},\n  (error)=>{}\n);\n```\n## Proxy Support\n```js\nconst ProxyAgent = require('proxy-agent');\n\nconst ygg = require('yggdrasil')({\n  //Any type of HTTP Agent \n  agent: new ProxyAgent('https://example.com:8080')\n});\n```\n\n# Further Reading\n* [Authentication protocol documentation](http://wiki.vg/Authentication)\n* [node-minecraft-protocol](https://github.com/PrismarineJS/node-minecraft-protocol), a Minecraft client and server in Node.js\n","publish_time":1648415662902,"_cnpm_publish_time":1648415662902,"dist-tags":{"latest":"1.8.0"}}