mirror of
https://github.com/elyby/docs.git
synced 2025-05-31 14:11:48 +05:30
Deploying to gh-pages from @ elyby/docs@bb30974d09 🚀
This commit is contained in:
12
en/_static/documentation_options.js
Normal file
12
en/_static/documentation_options.js
Normal file
@@ -0,0 +1,12 @@
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
|
||||
VERSION: '',
|
||||
LANGUAGE: 'en',
|
||||
COLLAPSE_INDEX: false,
|
||||
BUILDER: 'html',
|
||||
FILE_SUFFIX: '.html',
|
||||
LINK_SUFFIX: '.html',
|
||||
HAS_SOURCE: true,
|
||||
SOURCELINK_SUFFIX: '.txt',
|
||||
NAVIGATION_WITH_KEYS: false
|
||||
};
|
297
en/_static/language_data.js
Normal file
297
en/_static/language_data.js
Normal file
@@ -0,0 +1,297 @@
|
||||
/*
|
||||
* language_data.js
|
||||
* ~~~~~~~~~~~~~~~~
|
||||
*
|
||||
* This script contains the language-specific data used by searchtools.js,
|
||||
* namely the list of stopwords, stemmer, scorer and splitter.
|
||||
*
|
||||
* :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
|
||||
* :license: BSD, see LICENSE for details.
|
||||
*
|
||||
*/
|
||||
|
||||
var stopwords = ["a","and","are","as","at","be","but","by","for","if","in","into","is","it","near","no","not","of","on","or","such","that","the","their","then","there","these","they","this","to","was","will","with"];
|
||||
|
||||
|
||||
/* Non-minified version is copied as a separate JS file, is available */
|
||||
|
||||
/**
|
||||
* Porter Stemmer
|
||||
*/
|
||||
var Stemmer = function() {
|
||||
|
||||
var step2list = {
|
||||
ational: 'ate',
|
||||
tional: 'tion',
|
||||
enci: 'ence',
|
||||
anci: 'ance',
|
||||
izer: 'ize',
|
||||
bli: 'ble',
|
||||
alli: 'al',
|
||||
entli: 'ent',
|
||||
eli: 'e',
|
||||
ousli: 'ous',
|
||||
ization: 'ize',
|
||||
ation: 'ate',
|
||||
ator: 'ate',
|
||||
alism: 'al',
|
||||
iveness: 'ive',
|
||||
fulness: 'ful',
|
||||
ousness: 'ous',
|
||||
aliti: 'al',
|
||||
iviti: 'ive',
|
||||
biliti: 'ble',
|
||||
logi: 'log'
|
||||
};
|
||||
|
||||
var step3list = {
|
||||
icate: 'ic',
|
||||
ative: '',
|
||||
alize: 'al',
|
||||
iciti: 'ic',
|
||||
ical: 'ic',
|
||||
ful: '',
|
||||
ness: ''
|
||||
};
|
||||
|
||||
var c = "[^aeiou]"; // consonant
|
||||
var v = "[aeiouy]"; // vowel
|
||||
var C = c + "[^aeiouy]*"; // consonant sequence
|
||||
var V = v + "[aeiou]*"; // vowel sequence
|
||||
|
||||
var mgr0 = "^(" + C + ")?" + V + C; // [C]VC... is m>0
|
||||
var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$"; // [C]VC[V] is m=1
|
||||
var mgr1 = "^(" + C + ")?" + V + C + V + C; // [C]VCVC... is m>1
|
||||
var s_v = "^(" + C + ")?" + v; // vowel in stem
|
||||
|
||||
this.stemWord = function (w) {
|
||||
var stem;
|
||||
var suffix;
|
||||
var firstch;
|
||||
var origword = w;
|
||||
|
||||
if (w.length < 3)
|
||||
return w;
|
||||
|
||||
var re;
|
||||
var re2;
|
||||
var re3;
|
||||
var re4;
|
||||
|
||||
firstch = w.substr(0,1);
|
||||
if (firstch == "y")
|
||||
w = firstch.toUpperCase() + w.substr(1);
|
||||
|
||||
// Step 1a
|
||||
re = /^(.+?)(ss|i)es$/;
|
||||
re2 = /^(.+?)([^s])s$/;
|
||||
|
||||
if (re.test(w))
|
||||
w = w.replace(re,"$1$2");
|
||||
else if (re2.test(w))
|
||||
w = w.replace(re2,"$1$2");
|
||||
|
||||
// Step 1b
|
||||
re = /^(.+?)eed$/;
|
||||
re2 = /^(.+?)(ed|ing)$/;
|
||||
if (re.test(w)) {
|
||||
var fp = re.exec(w);
|
||||
re = new RegExp(mgr0);
|
||||
if (re.test(fp[1])) {
|
||||
re = /.$/;
|
||||
w = w.replace(re,"");
|
||||
}
|
||||
}
|
||||
else if (re2.test(w)) {
|
||||
var fp = re2.exec(w);
|
||||
stem = fp[1];
|
||||
re2 = new RegExp(s_v);
|
||||
if (re2.test(stem)) {
|
||||
w = stem;
|
||||
re2 = /(at|bl|iz)$/;
|
||||
re3 = new RegExp("([^aeiouylsz])\\1$");
|
||||
re4 = new RegExp("^" + C + v + "[^aeiouwxy]$");
|
||||
if (re2.test(w))
|
||||
w = w + "e";
|
||||
else if (re3.test(w)) {
|
||||
re = /.$/;
|
||||
w = w.replace(re,"");
|
||||
}
|
||||
else if (re4.test(w))
|
||||
w = w + "e";
|
||||
}
|
||||
}
|
||||
|
||||
// Step 1c
|
||||
re = /^(.+?)y$/;
|
||||
if (re.test(w)) {
|
||||
var fp = re.exec(w);
|
||||
stem = fp[1];
|
||||
re = new RegExp(s_v);
|
||||
if (re.test(stem))
|
||||
w = stem + "i";
|
||||
}
|
||||
|
||||
// Step 2
|
||||
re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/;
|
||||
if (re.test(w)) {
|
||||
var fp = re.exec(w);
|
||||
stem = fp[1];
|
||||
suffix = fp[2];
|
||||
re = new RegExp(mgr0);
|
||||
if (re.test(stem))
|
||||
w = stem + step2list[suffix];
|
||||
}
|
||||
|
||||
// Step 3
|
||||
re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/;
|
||||
if (re.test(w)) {
|
||||
var fp = re.exec(w);
|
||||
stem = fp[1];
|
||||
suffix = fp[2];
|
||||
re = new RegExp(mgr0);
|
||||
if (re.test(stem))
|
||||
w = stem + step3list[suffix];
|
||||
}
|
||||
|
||||
// Step 4
|
||||
re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/;
|
||||
re2 = /^(.+?)(s|t)(ion)$/;
|
||||
if (re.test(w)) {
|
||||
var fp = re.exec(w);
|
||||
stem = fp[1];
|
||||
re = new RegExp(mgr1);
|
||||
if (re.test(stem))
|
||||
w = stem;
|
||||
}
|
||||
else if (re2.test(w)) {
|
||||
var fp = re2.exec(w);
|
||||
stem = fp[1] + fp[2];
|
||||
re2 = new RegExp(mgr1);
|
||||
if (re2.test(stem))
|
||||
w = stem;
|
||||
}
|
||||
|
||||
// Step 5
|
||||
re = /^(.+?)e$/;
|
||||
if (re.test(w)) {
|
||||
var fp = re.exec(w);
|
||||
stem = fp[1];
|
||||
re = new RegExp(mgr1);
|
||||
re2 = new RegExp(meq1);
|
||||
re3 = new RegExp("^" + C + v + "[^aeiouwxy]$");
|
||||
if (re.test(stem) || (re2.test(stem) && !(re3.test(stem))))
|
||||
w = stem;
|
||||
}
|
||||
re = /ll$/;
|
||||
re2 = new RegExp(mgr1);
|
||||
if (re.test(w) && re2.test(w)) {
|
||||
re = /.$/;
|
||||
w = w.replace(re,"");
|
||||
}
|
||||
|
||||
// and turn initial Y back to y
|
||||
if (firstch == "y")
|
||||
w = firstch.toLowerCase() + w.substr(1);
|
||||
return w;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
var splitChars = (function() {
|
||||
var result = {};
|
||||
var singles = [96, 180, 187, 191, 215, 247, 749, 885, 903, 907, 909, 930, 1014, 1648,
|
||||
1748, 1809, 2416, 2473, 2481, 2526, 2601, 2609, 2612, 2615, 2653, 2702,
|
||||
2706, 2729, 2737, 2740, 2857, 2865, 2868, 2910, 2928, 2948, 2961, 2971,
|
||||
2973, 3085, 3089, 3113, 3124, 3213, 3217, 3241, 3252, 3295, 3341, 3345,
|
||||
3369, 3506, 3516, 3633, 3715, 3721, 3736, 3744, 3748, 3750, 3756, 3761,
|
||||
3781, 3912, 4239, 4347, 4681, 4695, 4697, 4745, 4785, 4799, 4801, 4823,
|
||||
4881, 5760, 5901, 5997, 6313, 7405, 8024, 8026, 8028, 8030, 8117, 8125,
|
||||
8133, 8181, 8468, 8485, 8487, 8489, 8494, 8527, 11311, 11359, 11687, 11695,
|
||||
11703, 11711, 11719, 11727, 11735, 12448, 12539, 43010, 43014, 43019, 43587,
|
||||
43696, 43713, 64286, 64297, 64311, 64317, 64319, 64322, 64325, 65141];
|
||||
var i, j, start, end;
|
||||
for (i = 0; i < singles.length; i++) {
|
||||
result[singles[i]] = true;
|
||||
}
|
||||
var ranges = [[0, 47], [58, 64], [91, 94], [123, 169], [171, 177], [182, 184], [706, 709],
|
||||
[722, 735], [741, 747], [751, 879], [888, 889], [894, 901], [1154, 1161],
|
||||
[1318, 1328], [1367, 1368], [1370, 1376], [1416, 1487], [1515, 1519], [1523, 1568],
|
||||
[1611, 1631], [1642, 1645], [1750, 1764], [1767, 1773], [1789, 1790], [1792, 1807],
|
||||
[1840, 1868], [1958, 1968], [1970, 1983], [2027, 2035], [2038, 2041], [2043, 2047],
|
||||
[2070, 2073], [2075, 2083], [2085, 2087], [2089, 2307], [2362, 2364], [2366, 2383],
|
||||
[2385, 2391], [2402, 2405], [2419, 2424], [2432, 2436], [2445, 2446], [2449, 2450],
|
||||
[2483, 2485], [2490, 2492], [2494, 2509], [2511, 2523], [2530, 2533], [2546, 2547],
|
||||
[2554, 2564], [2571, 2574], [2577, 2578], [2618, 2648], [2655, 2661], [2672, 2673],
|
||||
[2677, 2692], [2746, 2748], [2750, 2767], [2769, 2783], [2786, 2789], [2800, 2820],
|
||||
[2829, 2830], [2833, 2834], [2874, 2876], [2878, 2907], [2914, 2917], [2930, 2946],
|
||||
[2955, 2957], [2966, 2968], [2976, 2978], [2981, 2983], [2987, 2989], [3002, 3023],
|
||||
[3025, 3045], [3059, 3076], [3130, 3132], [3134, 3159], [3162, 3167], [3170, 3173],
|
||||
[3184, 3191], [3199, 3204], [3258, 3260], [3262, 3293], [3298, 3301], [3312, 3332],
|
||||
[3386, 3388], [3390, 3423], [3426, 3429], [3446, 3449], [3456, 3460], [3479, 3481],
|
||||
[3518, 3519], [3527, 3584], [3636, 3647], [3655, 3663], [3674, 3712], [3717, 3718],
|
||||
[3723, 3724], [3726, 3731], [3752, 3753], [3764, 3772], [3774, 3775], [3783, 3791],
|
||||
[3802, 3803], [3806, 3839], [3841, 3871], [3892, 3903], [3949, 3975], [3980, 4095],
|
||||
[4139, 4158], [4170, 4175], [4182, 4185], [4190, 4192], [4194, 4196], [4199, 4205],
|
||||
[4209, 4212], [4226, 4237], [4250, 4255], [4294, 4303], [4349, 4351], [4686, 4687],
|
||||
[4702, 4703], [4750, 4751], [4790, 4791], [4806, 4807], [4886, 4887], [4955, 4968],
|
||||
[4989, 4991], [5008, 5023], [5109, 5120], [5741, 5742], [5787, 5791], [5867, 5869],
|
||||
[5873, 5887], [5906, 5919], [5938, 5951], [5970, 5983], [6001, 6015], [6068, 6102],
|
||||
[6104, 6107], [6109, 6111], [6122, 6127], [6138, 6159], [6170, 6175], [6264, 6271],
|
||||
[6315, 6319], [6390, 6399], [6429, 6469], [6510, 6511], [6517, 6527], [6572, 6592],
|
||||
[6600, 6607], [6619, 6655], [6679, 6687], [6741, 6783], [6794, 6799], [6810, 6822],
|
||||
[6824, 6916], [6964, 6980], [6988, 6991], [7002, 7042], [7073, 7085], [7098, 7167],
|
||||
[7204, 7231], [7242, 7244], [7294, 7400], [7410, 7423], [7616, 7679], [7958, 7959],
|
||||
[7966, 7967], [8006, 8007], [8014, 8015], [8062, 8063], [8127, 8129], [8141, 8143],
|
||||
[8148, 8149], [8156, 8159], [8173, 8177], [8189, 8303], [8306, 8307], [8314, 8318],
|
||||
[8330, 8335], [8341, 8449], [8451, 8454], [8456, 8457], [8470, 8472], [8478, 8483],
|
||||
[8506, 8507], [8512, 8516], [8522, 8525], [8586, 9311], [9372, 9449], [9472, 10101],
|
||||
[10132, 11263], [11493, 11498], [11503, 11516], [11518, 11519], [11558, 11567],
|
||||
[11622, 11630], [11632, 11647], [11671, 11679], [11743, 11822], [11824, 12292],
|
||||
[12296, 12320], [12330, 12336], [12342, 12343], [12349, 12352], [12439, 12444],
|
||||
[12544, 12548], [12590, 12592], [12687, 12689], [12694, 12703], [12728, 12783],
|
||||
[12800, 12831], [12842, 12880], [12896, 12927], [12938, 12976], [12992, 13311],
|
||||
[19894, 19967], [40908, 40959], [42125, 42191], [42238, 42239], [42509, 42511],
|
||||
[42540, 42559], [42592, 42593], [42607, 42622], [42648, 42655], [42736, 42774],
|
||||
[42784, 42785], [42889, 42890], [42893, 43002], [43043, 43055], [43062, 43071],
|
||||
[43124, 43137], [43188, 43215], [43226, 43249], [43256, 43258], [43260, 43263],
|
||||
[43302, 43311], [43335, 43359], [43389, 43395], [43443, 43470], [43482, 43519],
|
||||
[43561, 43583], [43596, 43599], [43610, 43615], [43639, 43641], [43643, 43647],
|
||||
[43698, 43700], [43703, 43704], [43710, 43711], [43715, 43738], [43742, 43967],
|
||||
[44003, 44015], [44026, 44031], [55204, 55215], [55239, 55242], [55292, 55295],
|
||||
[57344, 63743], [64046, 64047], [64110, 64111], [64218, 64255], [64263, 64274],
|
||||
[64280, 64284], [64434, 64466], [64830, 64847], [64912, 64913], [64968, 65007],
|
||||
[65020, 65135], [65277, 65295], [65306, 65312], [65339, 65344], [65371, 65381],
|
||||
[65471, 65473], [65480, 65481], [65488, 65489], [65496, 65497]];
|
||||
for (i = 0; i < ranges.length; i++) {
|
||||
start = ranges[i][0];
|
||||
end = ranges[i][1];
|
||||
for (j = start; j <= end; j++) {
|
||||
result[j] = true;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
})();
|
||||
|
||||
function splitQuery(query) {
|
||||
var result = [];
|
||||
var start = -1;
|
||||
for (var i = 0; i < query.length; i++) {
|
||||
if (splitChars[query.charCodeAt(i)]) {
|
||||
if (start !== -1) {
|
||||
result.push(query.slice(start, i));
|
||||
start = -1;
|
||||
}
|
||||
} else if (start === -1) {
|
||||
start = i;
|
||||
}
|
||||
}
|
||||
if (start !== -1) {
|
||||
result.push(query.slice(start));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
365
en/api.html
Normal file
365
en/api.html
Normal file
@@ -0,0 +1,365 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Ely.by API (Mojang API simulation) — Ely.by Docs</title>
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="/_static/css/theme.css" type="text/css">
|
||||
<link rel="stylesheet" href="/_static/pygments.css" type="text/css">
|
||||
<link rel="stylesheet" href="/_static/style.css" type="text/css">
|
||||
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="/_static/favicon.ico">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="_static/js/html5shiv.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
<script type="text/javascript" id="documentation_options" data-url_root="./" src="/en/_static/documentation_options.js"></script>
|
||||
<script src="/_static/jquery.js"></script>
|
||||
<script src="/_static/underscore.js"></script>
|
||||
<script src="/_static/doctools.js"></script>
|
||||
|
||||
<script type="text/javascript" src="/_static/js/theme.js"></script>
|
||||
|
||||
|
||||
<link rel="index" title="Index" href="/en/genindex.html">
|
||||
<link rel="search" title="Search" href="/en/search.html">
|
||||
<link rel="next" title="Authlib-injector" href="/en/authlib-injector.html">
|
||||
<link rel="prev" title="Welcome to the Ely.by documentation!" href="/en/index.html">
|
||||
</head>
|
||||
|
||||
<body class="wy-body-for-nav">
|
||||
|
||||
|
||||
<div class="wy-grid-for-nav">
|
||||
|
||||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||||
<div class="wy-side-scroll">
|
||||
<div class="wy-side-nav-search">
|
||||
|
||||
|
||||
|
||||
<a href="/en/index.html" class="icon icon-home"> Ely.by Documentation
|
||||
|
||||
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div role="search">
|
||||
<form id="rtd-search-form" class="wy-form" action="/en/search.html" method="get">
|
||||
<input type="text" name="q" placeholder="Search docs">
|
||||
<input type="hidden" name="check_keywords" value="yes">
|
||||
<input type="hidden" name="area" value="default">
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="caption"><span class="caption-text">English articles:</span></p>
|
||||
<ul class="current">
|
||||
<li class="toctree-l1 current"><a class="current reference internal" href="#">Ely.by API (Mojang API simulation)</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#id1">Requests</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#uuid">UUID by username at a time</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#id2">Username by UUID + history of changes</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#id3">Usernames list to their UUIDs</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#id4">Profile info by UUID</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#id5">Possible errors</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#illegalargumentexception">IllegalArgumentException</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/en/authlib-injector.html">Authlib-injector</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/en/minecraft-auth.html">Authentication for Minecraft</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/en/oauth.html">Authorization via OAuth2 protocol</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/en/skins-system.html">Skins system</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="caption"><span class="caption-text">Статьи на русском:</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/ru/api.html">Ely.by API (симуляция Mojang API)</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/ru/authlib-injector.html">Authlib-injector</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/ru/minecraft-auth.html">Авторизация для Minecraft</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/ru/oauth.html">Авторизация по протоколу OAuth2</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/ru/skins-system.html">Система скинов</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||
|
||||
|
||||
<nav class="wy-nav-top" aria-label="top navigation">
|
||||
|
||||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||
<a href="/en/index.html">Ely.by Documentation</a>
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
<div class="wy-nav-content">
|
||||
|
||||
<div class="rst-content">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div role="navigation" aria-label="breadcrumbs navigation">
|
||||
|
||||
<ul class="wy-breadcrumbs">
|
||||
|
||||
<li><a href="/en/index.html" class="icon icon-home"></a> »</li>
|
||||
|
||||
<li>Ely.by API (Mojang API simulation)</li>
|
||||
|
||||
|
||||
<li class="wy-breadcrumbs-aside">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<hr>
|
||||
</div>
|
||||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||||
<div itemprop="articleBody">
|
||||
|
||||
<div class="section" id="ely-by-api-mojang-api">
|
||||
<h1>Ely.by API (Mojang API simulation)<a class="headerlink" href="#ely-by-api-mojang-api" title="Permalink to this headline">¶</a></h1>
|
||||
<p>This article contains information about the API compatible with the <a class="reference external" href="http://wiki.vg/Mojang_API">Mojang API</a> functionality. Please note that this is not a full-fledged API of Ely.by, but only a set of additional requests implemented based on our <a class="reference internal" href="/en/minecraft-auth.html"><span class="doc">authorization server</span></a>.</p>
|
||||
<div class="section" id="id1">
|
||||
<h2>Requests<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h2>
|
||||
<div class="admonition note">
|
||||
<p class="admonition-title">Note</p>
|
||||
<p>The API has no rate limit. We just have a configured fail2ban that will ban especially annoying clients. That’s the way.</p>
|
||||
</div>
|
||||
<p>This section will describe the requests and their corresponding variants for Mojang API. Base URL for requests is <code class="docutils literal notranslate"><span class="pre">https://authserver.ely.by</span></code>.</p>
|
||||
<div class="section" id="uuid">
|
||||
<h3>UUID by username at a time<a class="headerlink" href="#uuid" title="Permalink to this headline">¶</a></h3>
|
||||
<p>This request allows you to find out the UUID of a user by their username at a specified point in time. The time is specified via GET parameter at as a Unix timestamp.</p>
|
||||
<dl class="py function">
|
||||
<dt>
|
||||
<code class="sig-name descname"><span class="pre">GET</span> <span class="pre">/api/users/profiles/minecraft/{username}</span></code></dt>
|
||||
<dd><p>Where <a href="#id1"><span class="problematic" id="id2">``</span></a>{username}’’ is the searched username. It can be passed in any case (in the Mojang API, only strict match).</p>
|
||||
<p>Note that the legacy and demo params will never be returned, as these parameters have no alternative in Ely and are specific only for Mojang services.</p>
|
||||
</dd></dl>
|
||||
|
||||
<p>In case of a successful request you will receive the following response:</p>
|
||||
<div class="highlight-javascript notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
||||
<span class="s2">"id"</span><span class="o">:</span> <span class="s2">"ffc8fdc95824509e8a57c99b940fb996"</span><span class="p">,</span>
|
||||
<span class="s2">"name"</span><span class="o">:</span> <span class="s2">"ErickSkrauch"</span>
|
||||
<span class="p">}</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>When the passed username isn’t found, you will receive a response with <code class="docutils literal notranslate"><span class="pre">204</span></code> status code and an empty body.</p>
|
||||
</div>
|
||||
<div class="section" id="id2">
|
||||
<h3>Username by UUID + history of changes<a class="headerlink" href="#id2" title="Permalink to this headline">¶</a></h3>
|
||||
<p>This request allows you to find out all usernames used by a user by their UUID.</p>
|
||||
<dl class="py function">
|
||||
<dt>
|
||||
<code class="sig-name descname"><span class="pre">GET</span> <span class="pre">/api/user/profiles/{uuid}/names</span></code></dt>
|
||||
<dd><p>Where <code class="docutils literal notranslate"><span class="pre">{uuid}</span></code> is a valid UUID. UUID might be written with or without hyphens. If an invalid string is passed, <a class="reference internal" href="#illegalargumentexception">IllegalArgumentException</a> will be returned with the message <code class="docutils literal notranslate"><span class="pre">"Invalid</span> <span class="pre">uuid</span> <span class="pre">format."</span></code>.</p>
|
||||
</dd></dl>
|
||||
|
||||
<p>In case of a successful request you will receive the following response:</p>
|
||||
<div class="highlight-javascript notranslate"><div class="highlight"><pre><span></span><span class="p">[</span>
|
||||
<span class="p">{</span>
|
||||
<span class="s2">"name"</span><span class="o">:</span> <span class="s2">"Admin"</span>
|
||||
<span class="p">},</span>
|
||||
<span class="p">{</span>
|
||||
<span class="s2">"name"</span><span class="o">:</span> <span class="s2">"ErickSkrauch"</span><span class="p">,</span>
|
||||
<span class="s2">"changedToAt"</span><span class="o">:</span> <span class="mf">1440707723000</span>
|
||||
<span class="p">}</span>
|
||||
<span class="p">]</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<div class="admonition note">
|
||||
<p class="admonition-title">Note</p>
|
||||
<p>Since Ely.by doesn’t store the moment of username change only 1 username will always be returned. We may add full support for remembering when a username was changed in the future.</p>
|
||||
</div>
|
||||
<p>When the passed UUID isn’t found, you will receive a response with <code class="docutils literal notranslate"><span class="pre">204</span></code> status code and an empty body.</p>
|
||||
</div>
|
||||
<div class="section" id="id3">
|
||||
<h3>Usernames list to their UUIDs<a class="headerlink" href="#id3" title="Permalink to this headline">¶</a></h3>
|
||||
<p>This request allows you to query a list of users’ UUIDs by their usernames.</p>
|
||||
<dl class="py function">
|
||||
<dt>
|
||||
<code class="sig-name descname"><span class="pre">POST</span> <span class="pre">/api/profiles/minecraft</span></code></dt>
|
||||
<dd><p>In the request body or POST parameters you need to pass a valid JSON array of the searched usernames.</p>
|
||||
<p>The array must contain no more than 100 usernames, otherwise <a class="reference internal" href="#illegalargumentexception">IllegalArgumentException</a> will be returned with the message <code class="docutils literal notranslate"><span class="pre">"Not</span> <span class="pre">more</span> <span class="pre">than</span> <span class="pre">that</span> <span class="pre">100</span> <span class="pre">profile</span> <span class="pre">names</span> <span class="pre">per</span> <span class="pre">call</span> <span class="pre">is</span> <span class="pre">allowed."</span></code>. In case the passed string is an invalid JSON object, the same exception will be returned, but with the text <code class="docutils literal notranslate"><span class="pre">"Passed</span> <span class="pre">array</span> <span class="pre">of</span> <span class="pre">profile</span> <span class="pre">names</span> <span class="pre">is</span> <span class="pre">an</span> <span class="pre">invalid</span> <span class="pre">JSON</span> <span class="pre">string."</span></code>.</p>
|
||||
<p>Example of a request body:</p>
|
||||
<div class="highlight-javascript notranslate"><div class="highlight"><pre><span></span><span class="p">[</span><span class="s2">"ErickSkrauch"</span><span class="p">,</span> <span class="s2">"EnoTiK"</span><span class="p">,</span> <span class="s2">"KmotherfuckerF"</span><span class="p">]</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</dd></dl>
|
||||
|
||||
<p>In case of a successful request you will receive the following response:</p>
|
||||
<div class="highlight-javascript notranslate"><div class="highlight"><pre><span></span><span class="p">[</span>
|
||||
<span class="p">{</span>
|
||||
<span class="s2">"id"</span><span class="o">:</span> <span class="s2">"ffc8fdc95824509e8a57c99b940fb996"</span><span class="p">,</span>
|
||||
<span class="s2">"name"</span><span class="o">:</span> <span class="s2">"ErickSkrauch"</span>
|
||||
<span class="p">},</span>
|
||||
<span class="p">{</span>
|
||||
<span class="s2">"id"</span><span class="o">:</span> <span class="s2">"b8407ae8218658ef96bb0cb3813acdfd"</span><span class="p">,</span>
|
||||
<span class="s2">"name"</span><span class="o">:</span> <span class="s2">"EnoTiK"</span>
|
||||
<span class="p">},</span>
|
||||
<span class="p">{</span>
|
||||
<span class="s2">"id"</span><span class="o">:</span> <span class="s2">"39f42ba723de56d98867eabafc5e8e91"</span><span class="p">,</span>
|
||||
<span class="s2">"name"</span><span class="o">:</span> <span class="s2">"KmotherfuckerF"</span>
|
||||
<span class="p">}</span>
|
||||
<span class="p">]</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>The data is returned in the same order they were requested.</p>
|
||||
<p>If one of the passed usernames isn’t found in the database, no value will be returned for it (it will be skipped). Keep this in mind when parsing the response.</p>
|
||||
</div>
|
||||
<div class="section" id="id4">
|
||||
<h3>Profile info by UUID<a class="headerlink" href="#id4" title="Permalink to this headline">¶</a></h3>
|
||||
<p>See the <a class="reference internal" href="/en/minecraft-auth.html#profile-request"><span class="std std-ref">profile request for the authorization server</span></a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="id5">
|
||||
<h2>Possible errors<a class="headerlink" href="#id5" title="Permalink to this headline">¶</a></h2>
|
||||
<div class="section" id="illegalargumentexception">
|
||||
<span id="id6"></span><h3>IllegalArgumentException<a class="headerlink" href="#illegalargumentexception" title="Permalink to this headline">¶</a></h3>
|
||||
<p>This error occurs when attempting to send data to the server in an incorrect format.</p>
|
||||
<p>An error example:</p>
|
||||
<div class="highlight-javascript notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
||||
<span class="s2">"error"</span><span class="o">:</span> <span class="s2">"IllegalArgumentException"</span><span class="p">,</span>
|
||||
<span class="s2">"errorMessage"</span><span class="o">:</span> <span class="s2">"Invalid uuid format."</span>
|
||||
<span class="p">}</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>The <code class="docutils literal notranslate"><span class="pre">errorMessage</span></code> is not always matches Mojang’s strings, but the differences are only apparent to Ely-specific errors. The original requests and the errors expected from them repeat Mojang texts.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<footer>
|
||||
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
|
||||
<a href="/en/authlib-injector.html" class="btn btn-neutral float-right" title="Authlib-injector" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
|
||||
<a href="/en/index.html" class="btn btn-neutral float-left" title="Welcome to the Ely.by documentation!" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
© Copyright 2024, Ely.by.
|
||||
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
|
||||
|
||||
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
|
||||
|
||||
provided by <a href="https://readthedocs.org">Read the Docs</a>.
|
||||
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function () {
|
||||
SphinxRtdTheme.Navigation.enable(true);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-45299905-2"></script>
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
gtag('js', new Date());
|
||||
|
||||
gtag('config', 'UA-45299905-2');
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
325
en/authlib-injector.html
Normal file
325
en/authlib-injector.html
Normal file
@@ -0,0 +1,325 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Authlib-injector — Ely.by Docs</title>
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="/_static/css/theme.css" type="text/css">
|
||||
<link rel="stylesheet" href="/_static/pygments.css" type="text/css">
|
||||
<link rel="stylesheet" href="/_static/style.css" type="text/css">
|
||||
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="/_static/favicon.ico">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="_static/js/html5shiv.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
<script type="text/javascript" id="documentation_options" data-url_root="./" src="/en/_static/documentation_options.js"></script>
|
||||
<script src="/_static/jquery.js"></script>
|
||||
<script src="/_static/underscore.js"></script>
|
||||
<script src="/_static/doctools.js"></script>
|
||||
|
||||
<script type="text/javascript" src="/_static/js/theme.js"></script>
|
||||
|
||||
|
||||
<link rel="index" title="Index" href="/en/genindex.html">
|
||||
<link rel="search" title="Search" href="/en/search.html">
|
||||
<link rel="next" title="Authentication for Minecraft" href="/en/minecraft-auth.html">
|
||||
<link rel="prev" title="Ely.by API (Mojang API simulation)" href="/en/api.html">
|
||||
</head>
|
||||
|
||||
<body class="wy-body-for-nav">
|
||||
|
||||
|
||||
<div class="wy-grid-for-nav">
|
||||
|
||||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||||
<div class="wy-side-scroll">
|
||||
<div class="wy-side-nav-search">
|
||||
|
||||
|
||||
|
||||
<a href="/en/index.html" class="icon icon-home"> Ely.by Documentation
|
||||
|
||||
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div role="search">
|
||||
<form id="rtd-search-form" class="wy-form" action="/en/search.html" method="get">
|
||||
<input type="text" name="q" placeholder="Search docs">
|
||||
<input type="hidden" name="check_keywords" value="yes">
|
||||
<input type="hidden" name="area" value="default">
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="caption"><span class="caption-text">English articles:</span></p>
|
||||
<ul class="current">
|
||||
<li class="toctree-l1"><a class="reference internal" href="/en/api.html">Ely.by API (Mojang API simulation)</a></li>
|
||||
<li class="toctree-l1 current"><a class="current reference internal" href="#">Authlib-injector</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#client">Installing in a game client</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#server">Installing on a server</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#bungeecord">BungeeCord</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#launchhelper">LaunchHelper</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/en/minecraft-auth.html">Authentication for Minecraft</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/en/oauth.html">Authorization via OAuth2 protocol</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/en/skins-system.html">Skins system</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="caption"><span class="caption-text">Статьи на русском:</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/ru/api.html">Ely.by API (симуляция Mojang API)</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/ru/authlib-injector.html">Authlib-injector</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/ru/minecraft-auth.html">Авторизация для Minecraft</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/ru/oauth.html">Авторизация по протоколу OAuth2</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/ru/skins-system.html">Система скинов</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||
|
||||
|
||||
<nav class="wy-nav-top" aria-label="top navigation">
|
||||
|
||||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||
<a href="/en/index.html">Ely.by Documentation</a>
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
<div class="wy-nav-content">
|
||||
|
||||
<div class="rst-content">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div role="navigation" aria-label="breadcrumbs navigation">
|
||||
|
||||
<ul class="wy-breadcrumbs">
|
||||
|
||||
<li><a href="/en/index.html" class="icon icon-home"></a> »</li>
|
||||
|
||||
<li>Authlib-injector</li>
|
||||
|
||||
|
||||
<li class="wy-breadcrumbs-aside">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<hr>
|
||||
</div>
|
||||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||||
<div itemprop="articleBody">
|
||||
|
||||
<div class="section" id="authlib-injector">
|
||||
<h1>Authlib-injector<a class="headerlink" href="#authlib-injector" title="Permalink to this headline">¶</a></h1>
|
||||
<p><strong>authlib-injector</strong> is a library that allows you to spoof authorization and session server addresses in the Authlib without modifying the library itself. It’s designed as an javaagent.</p>
|
||||
<p>This library significantly simplifies the installation of an alternative authorization service in the game client and server, since transformation occurs during application bootstrap process.</p>
|
||||
<p>You can download the latest version from the <a class="reference external" href="https://github.com/yushijinhun/authlib-injector/releases/latest">releases page on GitHub</a>.</p>
|
||||
<p>Here is the documentation of the key aspects of installing and using the library. For more information, see the <a class="reference external" href="https://github.com/yushijinhun/authlib-injector/wiki">original documentation in Chinese</a>.</p>
|
||||
<div class="section" id="client">
|
||||
<span id="id2"></span><h2>Installing in a game client<a class="headerlink" href="#client" title="Permalink to this headline">¶</a></h2>
|
||||
<div class="admonition attention">
|
||||
<p class="admonition-title">Attention</p>
|
||||
<p>This section describes how to install the authlib-injector into the game. The game launcher still needs to implement the authorization flow itself in order to pass the <code class="docutils literal notranslate"><span class="pre">accessToken</span></code> to the game.</p>
|
||||
</div>
|
||||
<p>To install the library, you need to specify it as a javaagent for the game. You can do this by prepending the line <code class="docutils literal notranslate"><span class="pre">-javaagent:/path/to/file/authlib-injector.jar=ely.by</span></code> as a game launching param. As the result, the launch command should look like this:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">java</span> <span class="o">-</span><span class="n">javaagent</span><span class="p">:</span><span class="o">/</span><span class="n">путь</span><span class="o">/</span><span class="n">до</span><span class="o">/</span><span class="n">файла</span><span class="o">/</span><span class="n">authlib</span><span class="o">-</span><span class="n">injector</span><span class="o">.</span><span class="n">jar</span><span class="o">=</span><span class="n">ely</span><span class="o">.</span><span class="n">by</span> <span class="o">-</span><span class="n">jar</span> <span class="n">minecraft</span><span class="o">.</span><span class="n">jar</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>If you run the game via launcher, then in “settings” you need to find a field for specifying additional JVM arguments, where you need to insert the line above.</p>
|
||||
<div class="figure align-center">
|
||||
<img alt="Редактирование аргументов JVM" src="/_images/launcher-jvm-options.png">
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="server">
|
||||
<span id="id3"></span><h2>Installing on a server<a class="headerlink" href="#server" title="Permalink to this headline">¶</a></h2>
|
||||
<p>Just as in the case with the game client, the library must be specified as javaagent. <a class="reference external" href="https://github.com/yushijinhun/authlib-injector/releases/latest">Download the library</a> and put in the server’s directory. Then add the javaagent call to the server launch command:</p>
|
||||
<div class="line-block">
|
||||
<div class="line">Before: <code class="docutils literal notranslate"><span class="pre">java</span> <span class="pre">-jar</span> <span class="pre">minecraft_server.jar</span></code></div>
|
||||
<div class="line">After: <code class="docutils literal notranslate"><span class="pre">java</span> <span class="pre">-javaagent:authlib-injector.jar=ely.by</span> <span class="pre">-jar</span> <span class="pre">minecraft_server.jar</span></code></div>
|
||||
</div>
|
||||
<p>During server startup you should see a message about the activation of the authlib-injector:</p>
|
||||
<div class="figure align-center">
|
||||
<img alt="Сообщение при запуске сервера" src="/_images/server-startup-messages.png">
|
||||
</div>
|
||||
<div class="section" id="bungeecord">
|
||||
<h3>BungeeCord<a class="headerlink" href="#bungeecord" title="Permalink to this headline">¶</a></h3>
|
||||
<p>The authlib-injector must be installed directly on the BungeeCord itself, as well as <strong>on all backends</strong> behind it. Note the configuration of the online-mode parameter:</p>
|
||||
<ul class="simple">
|
||||
<li><p>The BungeeCord’s configuration (<code class="docutils literal notranslate"><span class="pre">config.yml</span></code>) should contain <code class="docutils literal notranslate"><span class="pre">online_mode=true</span></code>.</p></li>
|
||||
<li><p>The servers behind the proxy must contain in their configuration (<code class="docutils literal notranslate"><span class="pre">server.properties</span></code>) the value <code class="docutils literal notranslate"><span class="pre">online-mode=false</span></code>.</p></li>
|
||||
</ul>
|
||||
<p>Using such configuration authorization will work for all logging in players and the internal servers will correctly display player skins.</p>
|
||||
</div>
|
||||
<div class="section" id="launchhelper">
|
||||
<h3>LaunchHelper<a class="headerlink" href="#launchhelper" title="Permalink to this headline">¶</a></h3>
|
||||
<p>Not all game hostings allow direct modifications of launch arguments. To get around this limitation, you can use a special server that runs the game server by mixing authlib-injector into it. To install, follow these instructions:</p>
|
||||
<ol class="arabic">
|
||||
<li><p>Download the corresponding LaunchHelper for your operating system from the <a class="reference external" href="https://github.com/Codex-in-somnio/LaunchHelper/releases/latest">releases page</a>.</p></li>
|
||||
<li><p>Upload this file and the <code class="docutils literal notranslate"><span class="pre">authlib-injector.jar</span></code> file to the server folder on your hosting site.</p></li>
|
||||
<li><p>Also create a <code class="docutils literal notranslate"><span class="pre">launchhelper.properties</span></code> file and put the following contents into it:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">javaAgentJarPath</span><span class="o">=</span><span class="n">authlib</span><span class="o">-</span><span class="n">injector</span><span class="o">.</span><span class="n">jar</span>
|
||||
<span class="n">javaAgentOptions</span><span class="o">=</span><span class="n">ely</span><span class="o">.</span><span class="n">by</span>
|
||||
<span class="n">execJarPath</span><span class="o">=</span><span class="n">minecraft_server</span><span class="o">.</span><span class="n">jar</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Where <code class="docutils literal notranslate"><span class="pre">javaAgentJarPath</span></code> contains the path to the authlib-injector.jar file and <code class="docutils literal notranslate"><span class="pre">execJarPath</span></code> contains the name of the server file.</p>
|
||||
</li>
|
||||
<li><p>In the hosting control panel, specify the <code class="docutils literal notranslate"><span class="pre">LaunchHelper.jar</span></code> as the server file.</p>
|
||||
<p>If you can’t change the executable file, you should rename the <code class="docutils literal notranslate"><span class="pre">LaunchHelper.jar</span></code> file to match your hosting requirements (usually, <code class="docutils literal notranslate"><span class="pre">server.jar</span></code>). In this case, you should have the following file structure:</p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="docutils literal notranslate"><span class="pre">server.jar</span></code> - the LaunchHelper file.</p></li>
|
||||
<li><p><code class="docutils literal notranslate"><span class="pre">minecraft_server.jar</span></code> - your server core.</p></li>
|
||||
<li><p><code class="docutils literal notranslate"><span class="pre">authlib-injector.jar</span></code> - the authlib-injector file.</p></li>
|
||||
<li><p><code class="docutils literal notranslate"><span class="pre">launchhelper.properties</span></code> - the configuration file for the LaunchHelper.</p></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<footer>
|
||||
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
|
||||
<a href="/en/minecraft-auth.html" class="btn btn-neutral float-right" title="Authentication for Minecraft" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
|
||||
<a href="/en/api.html" class="btn btn-neutral float-left" title="Ely.by API (Mojang API simulation)" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
© Copyright 2024, Ely.by.
|
||||
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
|
||||
|
||||
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
|
||||
|
||||
provided by <a href="https://readthedocs.org">Read the Docs</a>.
|
||||
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function () {
|
||||
SphinxRtdTheme.Navigation.enable(true);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-45299905-2"></script>
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
gtag('js', new Date());
|
||||
|
||||
gtag('config', 'UA-45299905-2');
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
253
en/genindex.html
Normal file
253
en/genindex.html
Normal file
@@ -0,0 +1,253 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Index — Ely.by Docs</title>
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="/_static/css/theme.css" type="text/css">
|
||||
<link rel="stylesheet" href="/_static/pygments.css" type="text/css">
|
||||
<link rel="stylesheet" href="/_static/style.css" type="text/css">
|
||||
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="/_static/favicon.ico">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="_static/js/html5shiv.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
<script type="text/javascript" id="documentation_options" data-url_root="./" src="/en/_static/documentation_options.js"></script>
|
||||
<script src="/_static/jquery.js"></script>
|
||||
<script src="/_static/underscore.js"></script>
|
||||
<script src="/_static/doctools.js"></script>
|
||||
|
||||
<script type="text/javascript" src="/_static/js/theme.js"></script>
|
||||
|
||||
|
||||
<link rel="index" title="Index" href="#">
|
||||
<link rel="search" title="Search" href="/en/search.html">
|
||||
</head>
|
||||
|
||||
<body class="wy-body-for-nav">
|
||||
|
||||
|
||||
<div class="wy-grid-for-nav">
|
||||
|
||||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||||
<div class="wy-side-scroll">
|
||||
<div class="wy-side-nav-search">
|
||||
|
||||
|
||||
|
||||
<a href="/en/index.html" class="icon icon-home"> Ely.by Documentation
|
||||
|
||||
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div role="search">
|
||||
<form id="rtd-search-form" class="wy-form" action="/en/search.html" method="get">
|
||||
<input type="text" name="q" placeholder="Search docs">
|
||||
<input type="hidden" name="check_keywords" value="yes">
|
||||
<input type="hidden" name="area" value="default">
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="caption"><span class="caption-text">English articles:</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/en/api.html">Ely.by API (Mojang API simulation)</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/en/authlib-injector.html">Authlib-injector</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/en/minecraft-auth.html">Authentication for Minecraft</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/en/oauth.html">Authorization via OAuth2 protocol</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/en/skins-system.html">Skins system</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="caption"><span class="caption-text">Статьи на русском:</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/ru/api.html">Ely.by API (симуляция Mojang API)</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/ru/authlib-injector.html">Authlib-injector</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/ru/minecraft-auth.html">Авторизация для Minecraft</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/ru/oauth.html">Авторизация по протоколу OAuth2</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/ru/skins-system.html">Система скинов</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||
|
||||
|
||||
<nav class="wy-nav-top" aria-label="top navigation">
|
||||
|
||||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||
<a href="/en/index.html">Ely.by Documentation</a>
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
<div class="wy-nav-content">
|
||||
|
||||
<div class="rst-content">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div role="navigation" aria-label="breadcrumbs navigation">
|
||||
|
||||
<ul class="wy-breadcrumbs">
|
||||
|
||||
<li><a href="/en/index.html" class="icon icon-home"></a> »</li>
|
||||
|
||||
<li>Index</li>
|
||||
|
||||
|
||||
<li class="wy-breadcrumbs-aside">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<hr>
|
||||
</div>
|
||||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||||
<div itemprop="articleBody">
|
||||
|
||||
|
||||
<h1 id="index">Index</h1>
|
||||
|
||||
<div class="genindex-jumpbox">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<footer>
|
||||
|
||||
<hr>
|
||||
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
© Copyright 2024, Ely.by.
|
||||
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
|
||||
|
||||
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
|
||||
|
||||
provided by <a href="https://readthedocs.org">Read the Docs</a>.
|
||||
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function () {
|
||||
SphinxRtdTheme.Navigation.enable(true);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-45299905-2"></script>
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
gtag('js', new Date());
|
||||
|
||||
gtag('config', 'UA-45299905-2');
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
292
en/index.html
Normal file
292
en/index.html
Normal file
@@ -0,0 +1,292 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Welcome to the Ely.by documentation! — Ely.by Docs</title>
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="/_static/css/theme.css" type="text/css">
|
||||
<link rel="stylesheet" href="/_static/pygments.css" type="text/css">
|
||||
<link rel="stylesheet" href="/_static/style.css" type="text/css">
|
||||
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="/_static/favicon.ico">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="_static/js/html5shiv.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
<script type="text/javascript" id="documentation_options" data-url_root="./" src="/en/_static/documentation_options.js"></script>
|
||||
<script src="/_static/jquery.js"></script>
|
||||
<script src="/_static/underscore.js"></script>
|
||||
<script src="/_static/doctools.js"></script>
|
||||
|
||||
<script type="text/javascript" src="/_static/js/theme.js"></script>
|
||||
|
||||
|
||||
<link rel="index" title="Index" href="/en/genindex.html">
|
||||
<link rel="search" title="Search" href="/en/search.html">
|
||||
<link rel="next" title="Ely.by API (Mojang API simulation)" href="/en/api.html">
|
||||
</head>
|
||||
|
||||
<body class="wy-body-for-nav">
|
||||
|
||||
|
||||
<div class="wy-grid-for-nav">
|
||||
|
||||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||||
<div class="wy-side-scroll">
|
||||
<div class="wy-side-nav-search">
|
||||
|
||||
|
||||
|
||||
<a href="#" class="icon icon-home"> Ely.by Documentation
|
||||
|
||||
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div role="search">
|
||||
<form id="rtd-search-form" class="wy-form" action="/en/search.html" method="get">
|
||||
<input type="text" name="q" placeholder="Search docs">
|
||||
<input type="hidden" name="check_keywords" value="yes">
|
||||
<input type="hidden" name="area" value="default">
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="caption"><span class="caption-text">English articles:</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/en/api.html">Ely.by API (Mojang API simulation)</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/en/authlib-injector.html">Authlib-injector</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/en/minecraft-auth.html">Authentication for Minecraft</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/en/oauth.html">Authorization via OAuth2 protocol</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/en/skins-system.html">Skins system</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="caption"><span class="caption-text">Статьи на русском:</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/ru/api.html">Ely.by API (симуляция Mojang API)</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/ru/authlib-injector.html">Authlib-injector</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/ru/minecraft-auth.html">Авторизация для Minecraft</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/ru/oauth.html">Авторизация по протоколу OAuth2</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/ru/skins-system.html">Система скинов</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||
|
||||
|
||||
<nav class="wy-nav-top" aria-label="top navigation">
|
||||
|
||||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||
<a href="#">Ely.by Documentation</a>
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
<div class="wy-nav-content">
|
||||
|
||||
<div class="rst-content">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div role="navigation" aria-label="breadcrumbs navigation">
|
||||
|
||||
<ul class="wy-breadcrumbs">
|
||||
|
||||
<li><a href="#" class="icon icon-home"></a> »</li>
|
||||
|
||||
<li>Welcome to the Ely.by documentation!</li>
|
||||
|
||||
|
||||
<li class="wy-breadcrumbs-aside">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<hr>
|
||||
</div>
|
||||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||||
<div itemprop="articleBody">
|
||||
|
||||
<div class="section" id="ely-by">
|
||||
<h1>Welcome to the Ely.by documentation!<a class="headerlink" href="#ely-by" title="Permalink to this headline">¶</a></h1>
|
||||
<p>In this documentation you will find information about the public services of the Ely.by project, using which you’ll be able to integrate your projects with the Ely.by services.</p>
|
||||
<p>You are free to improve this documentation in the <a class="reference external" href="https://github.com/elyby/docs">documentation’s repository</a>.</p>
|
||||
<div class="toctree-wrapper compound">
|
||||
<p class="caption"><span class="caption-text">English articles:</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/en/api.html">Ely.by API (Mojang API simulation)</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/en/api.html#id1">Requests</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/en/api.html#id5">Possible errors</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/en/authlib-injector.html">Authlib-injector</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/en/authlib-injector.html#client">Installing in a game client</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/en/authlib-injector.html#server">Installing on a server</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/en/minecraft-auth.html">Authentication for Minecraft</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/en/minecraft-auth.html#id1">General Provisions</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/en/minecraft-auth.html#id3">Authentication in the launcher</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/en/minecraft-auth.html#id4">Authentication on the server</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/en/minecraft-auth.html#id6">Single player</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/en/minecraft-auth.html#id7">Prebuilt Authlib libraries</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/en/minecraft-auth.html#install-server">Installing Authlib on a server</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/en/minecraft-auth.html#bungeecord">BungeeCord</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/en/minecraft-auth.html#id15">Installation on versions below 1.7.2</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/en/oauth.html">Authorization via OAuth2 protocol</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/en/oauth.html#id1">Application registration</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/en/oauth.html#id3">Authorization initiation</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/en/oauth.html#authorization-code-grant">Exchange auth code for a access key</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/en/oauth.html#id8">Getting user information</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/en/oauth.html#refresh-token-grant">Refreshing access token</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/en/oauth.html#id12">Available libraries</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/en/oauth.html#id13">Possible errors</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/en/skins-system.html">Skins system</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/en/skins-system.html#url">Requests URLs</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/en/skins-system.html#textures-proxy">Textures proxying</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/en/skins-system.html#id13">Ready-made implementations</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<footer>
|
||||
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
|
||||
<a href="/en/api.html" class="btn btn-neutral float-right" title="Ely.by API (Mojang API simulation)" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
© Copyright 2024, Ely.by.
|
||||
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
|
||||
|
||||
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
|
||||
|
||||
provided by <a href="https://readthedocs.org">Read the Docs</a>.
|
||||
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function () {
|
||||
SphinxRtdTheme.Navigation.enable(true);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-45299905-2"></script>
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
gtag('js', new Date());
|
||||
|
||||
gtag('config', 'UA-45299905-2');
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
661
en/minecraft-auth.html
Normal file
661
en/minecraft-auth.html
Normal file
@@ -0,0 +1,661 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Authentication for Minecraft — Ely.by Docs</title>
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="/_static/css/theme.css" type="text/css">
|
||||
<link rel="stylesheet" href="/_static/pygments.css" type="text/css">
|
||||
<link rel="stylesheet" href="/_static/style.css" type="text/css">
|
||||
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="/_static/favicon.ico">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="_static/js/html5shiv.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
<script type="text/javascript" id="documentation_options" data-url_root="./" src="/en/_static/documentation_options.js"></script>
|
||||
<script src="/_static/jquery.js"></script>
|
||||
<script src="/_static/underscore.js"></script>
|
||||
<script src="/_static/doctools.js"></script>
|
||||
|
||||
<script type="text/javascript" src="/_static/js/theme.js"></script>
|
||||
|
||||
|
||||
<link rel="index" title="Index" href="/en/genindex.html">
|
||||
<link rel="search" title="Search" href="/en/search.html">
|
||||
<link rel="next" title="Authorization via OAuth2 protocol" href="/en/oauth.html">
|
||||
<link rel="prev" title="Authlib-injector" href="/en/authlib-injector.html">
|
||||
</head>
|
||||
|
||||
<body class="wy-body-for-nav">
|
||||
|
||||
|
||||
<div class="wy-grid-for-nav">
|
||||
|
||||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||||
<div class="wy-side-scroll">
|
||||
<div class="wy-side-nav-search">
|
||||
|
||||
|
||||
|
||||
<a href="/en/index.html" class="icon icon-home"> Ely.by Documentation
|
||||
|
||||
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div role="search">
|
||||
<form id="rtd-search-form" class="wy-form" action="/en/search.html" method="get">
|
||||
<input type="text" name="q" placeholder="Search docs">
|
||||
<input type="hidden" name="check_keywords" value="yes">
|
||||
<input type="hidden" name="area" value="default">
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="caption"><span class="caption-text">English articles:</span></p>
|
||||
<ul class="current">
|
||||
<li class="toctree-l1"><a class="reference internal" href="/en/api.html">Ely.by API (Mojang API simulation)</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/en/authlib-injector.html">Authlib-injector</a></li>
|
||||
<li class="toctree-l1 current"><a class="current reference internal" href="#">Authentication for Minecraft</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#id1">General Provisions</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#id2">Expected errors</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#id3">Authentication in the launcher</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#id4">Authentication on the server</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#authlib">Via authlib</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#id5">For older versions</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#id6">Single player</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#id7">Prebuilt Authlib libraries</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#install-server">Installing Authlib on a server</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#vanilla">Vanilla server</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#bukkit-spigot">Bukkit/Spigot</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#forge-sponge">Forge/Sponge</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#paper-paperspigot">Paper (PaperSpigot)</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#bungeecord">BungeeCord</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#id15">Installation on versions below 1.7.2</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#id16">Installation example</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/en/oauth.html">Authorization via OAuth2 protocol</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/en/skins-system.html">Skins system</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="caption"><span class="caption-text">Статьи на русском:</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/ru/api.html">Ely.by API (симуляция Mojang API)</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/ru/authlib-injector.html">Authlib-injector</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/ru/minecraft-auth.html">Авторизация для Minecraft</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/ru/oauth.html">Авторизация по протоколу OAuth2</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/ru/skins-system.html">Система скинов</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||
|
||||
|
||||
<nav class="wy-nav-top" aria-label="top navigation">
|
||||
|
||||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||
<a href="/en/index.html">Ely.by Documentation</a>
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
<div class="wy-nav-content">
|
||||
|
||||
<div class="rst-content">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div role="navigation" aria-label="breadcrumbs navigation">
|
||||
|
||||
<ul class="wy-breadcrumbs">
|
||||
|
||||
<li><a href="/en/index.html" class="icon icon-home"></a> »</li>
|
||||
|
||||
<li>Authentication for Minecraft</li>
|
||||
|
||||
|
||||
<li class="wy-breadcrumbs-aside">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<hr>
|
||||
</div>
|
||||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||||
<div itemprop="articleBody">
|
||||
|
||||
<div class="section" id="minecraft">
|
||||
<h1>Authentication for Minecraft<a class="headerlink" href="#minecraft" title="Permalink to this headline">¶</a></h1>
|
||||
<p>This article contains the information on authentication in Minecraft launchers and servers using the Ely.by authorization service.</p>
|
||||
<p>The authentication protocol is implemented as similar as possible to the <a class="reference external" href="http://wiki.vg/Authentication">original Mojang authentication protocol</a>, but nevertheless this documentation describes all available functions specifically of the Ely.by authentication service.</p>
|
||||
<div class="section" id="id1">
|
||||
<h2>General Provisions<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h2>
|
||||
<ul>
|
||||
<li><p>All requests must be made at URL <strong>https://authserver.ely.by</strong>.</p></li>
|
||||
<li><p>If the request is successful, the server will return a response with status code 200. Any other code indicates an error.</p></li>
|
||||
<li><p>The server always responds with JSON data, except for system errors and responses to legacy requests. Take this into account to display the correct error message to the user.</p></li>
|
||||
<li><p>In the case of a standard error, you will receive the following data:</p>
|
||||
<div class="highlight-javascript notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
||||
<span class="s2">"error"</span><span class="o">:</span> <span class="s2">"Краткое описание ошибки"</span><span class="p">,</span>
|
||||
<span class="s2">"errorMessage"</span><span class="o">:</span> <span class="s2">"Более длинное описание ошибки на английском языке, пригодное для отображения пользователю."</span>
|
||||
<span class="p">}</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="section" id="id2">
|
||||
<h3>Expected errors<a class="headerlink" href="#id2" title="Permalink to this headline">¶</a></h3>
|
||||
<p>In contrast to the original protocol, a smaller range of errors is used in Ely:</p>
|
||||
<table class="colwidths-given docutils align-default">
|
||||
<colgroup>
|
||||
<col style="width: 20%">
|
||||
<col style="width: 50%">
|
||||
<col style="width: 30%">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr class="row-odd"><th class="head"><p>Error</p></th>
|
||||
<th class="head"><p>Reason</p></th>
|
||||
<th class="head"><p>Solution</p></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="row-even"><td><p>IllegalArgumentException</p></td>
|
||||
<td><p>You passed an incomplete list of data to execute the request.</p></td>
|
||||
<td><p>Carefully double-check what you send in the request and what is in the documentation.</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p>ForbiddenOperationException</p></td>
|
||||
<td><p>User entered/developer sent incorrect values.</p></td>
|
||||
<td><p>You need to display a notification to the user about incorrectly entered data.</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>A 404 status response is used to indicate a Not Found error.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="id3">
|
||||
<h2>Authentication in the launcher<a class="headerlink" href="#id3" title="Permalink to this headline">¶</a></h2>
|
||||
<p>This section describes authentication for the game launcher and describes the steps required to obtain an <code class="docutils literal notranslate"><span class="pre">accessToken</span></code> for the Minecraft game client. The authentication will result in a JWT token with <code class="docutils literal notranslate"><span class="pre">minecraft_server_session</span></code> <a class="reference internal" href="/en/oauth.html#available-scopes"><span class="std std-ref">access rights</span></a> being received.</p>
|
||||
<div class="admonition attention">
|
||||
<p class="admonition-title">Attention</p>
|
||||
<p>We recommend using <a class="reference internal" href="/en/oauth.html"><span class="doc">the OAuth 2.0 authentication protocol</span></a> and requesting <code class="docutils literal notranslate"><span class="pre">minecraft_server_session</span></code> <a class="reference internal" href="/en/oauth.html#available-scopes"><span class="std std-ref">access rights</span></a> as that is a more secure and user-friendly method.</p>
|
||||
</div>
|
||||
<dl class="py function">
|
||||
<dt>
|
||||
<code class="sig-name descname"><span class="pre">POST</span> <span class="pre">/auth/authenticate</span></code></dt>
|
||||
<dd><p>Direct authentication of the user using their login (username or E-mail), password and two-factor authentication token.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>username</strong> (<em>string</em>) – User’s nickname or their E-mail (preferable).</p></li>
|
||||
<li><p><strong>password</strong> (<em>string</em>) – User’s password or <code class="docutils literal notranslate"><span class="pre">password:token</span></code> combination.</p></li>
|
||||
<li><p><strong>clientToken</strong> (<em>string</em>) – A unique token of the user’s launcher.</p></li>
|
||||
<li><p><strong>requestUser</strong> (<em>bool</em>) – If the field is passed as <code class="docutils literal notranslate"><span class="pre">true</span></code>, the <code class="docutils literal notranslate"><span class="pre">user</span></code> field will be present in the server response.</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<p>The Ely.by accounts system supports additional user security with two-factor authentication. The Mojang’s authentication protocol doesn’t provide the possibility to pass TOTP tokens. To solve this problem and maintain compatibility with <a class="reference external" href="https://minecraft.gamepedia.com/Yggdrasil">Yggdrasil</a>’s server implementation, we suggest passing the token in the <code class="docutils literal notranslate"><span class="pre">password</span></code> field as <code class="docutils literal notranslate"><span class="pre">password:token</span></code>.</p>
|
||||
<p>Unfortunately, not all users are aware of this feature, so it would be better to explicitly request the user’s token and concatenate it in the code when receiving an error about the user’s account being protected by two-factor authentication.</p>
|
||||
<p>The logic is as follows:</p>
|
||||
<ol class="arabic">
|
||||
<li><p>If the user has provided a valid username and password, but two-factor authentication is enabled for their account, you will receive a response with a <code class="docutils literal notranslate"><span class="pre">401</span></code> status and the following content:</p>
|
||||
<div class="highlight-javascript notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
||||
<span class="s2">"error"</span><span class="o">:</span> <span class="s2">"ForbiddenOperationException"</span><span class="p">,</span>
|
||||
<span class="s2">"errorMessage"</span><span class="o">:</span> <span class="s2">"Account protected with two factor auth."</span>
|
||||
<span class="p">}</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</li>
|
||||
<li><p>Upon receiving this error, you should ask the user to enter a TOTP token, and then repeat the authentication request with the same credentials, adding a postfix to the password in the form <code class="docutils literal notranslate"><span class="pre">:token</span></code>, where <code class="docutils literal notranslate"><span class="pre">token</span></code> is the value entered by the user.</p>
|
||||
<p>If the user’s password was “password123” and the token was “123456”, the <code class="docutils literal notranslate"><span class="pre">password</span></code> field value will become “password123:123456” after concatenating.</p>
|
||||
</li>
|
||||
<li><p>If as a result of these actions you get a response with <code class="docutils literal notranslate"><span class="pre">401</span></code> status and <code class="docutils literal notranslate"><span class="pre">errorMessage</span></code> “Invalid credentials. Invalid email or password.”, it will indicate that the token passed is incorrect and must be re-requested from the user.</p></li>
|
||||
</ol>
|
||||
<p>If all data is passed correctly, you will receive the following response:</p>
|
||||
<div class="highlight-javascript notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
||||
<span class="s2">"accessToken"</span><span class="o">:</span> <span class="s2">"Длинная_строка_содержащая_access_token"</span><span class="p">,</span>
|
||||
<span class="s2">"clientToken"</span><span class="o">:</span> <span class="s2">"Переданный_в_запросе_client_token"</span><span class="p">,</span>
|
||||
<span class="s2">"availableProfiles"</span><span class="o">:</span> <span class="p">[</span>
|
||||
<span class="p">{</span>
|
||||
<span class="s2">"id"</span><span class="o">:</span> <span class="s2">"UUID_пользователя_без_дефисов"</span><span class="p">,</span>
|
||||
<span class="s2">"name"</span><span class="o">:</span> <span class="s2">"Текущий_username_пользователя"</span>
|
||||
<span class="p">}</span>
|
||||
<span class="p">],</span>
|
||||
<span class="s2">"selectedProfile"</span><span class="o">:</span> <span class="p">{</span>
|
||||
<span class="s2">"id"</span><span class="o">:</span> <span class="s2">"UUID_пользователя_без_дефисов"</span><span class="p">,</span>
|
||||
<span class="s2">"name"</span><span class="o">:</span> <span class="s2">"Текущий_username_пользователя"</span>
|
||||
<span class="p">},</span>
|
||||
<span class="s2">"user"</span><span class="o">:</span> <span class="p">{</span> <span class="cm">/* Только если передан параметр requestUser */</span>
|
||||
<span class="s2">"id"</span><span class="o">:</span> <span class="s2">"UUID_пользователя_без_дефисов"</span><span class="p">,</span>
|
||||
<span class="s2">"username"</span><span class="o">:</span> <span class="s2">"Текущий_username_пользователя"</span><span class="p">,</span>
|
||||
<span class="s2">"properties"</span><span class="o">:</span> <span class="p">[</span>
|
||||
<span class="p">{</span>
|
||||
<span class="s2">"name"</span><span class="o">:</span> <span class="s2">"preferredLanguage"</span><span class="p">,</span>
|
||||
<span class="s2">"value"</span><span class="o">:</span> <span class="s2">"ru"</span>
|
||||
<span class="p">}</span>
|
||||
<span class="p">]</span>
|
||||
<span class="p">}</span>
|
||||
<span class="p">}</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt>
|
||||
<code class="sig-name descname"><span class="pre">POST</span> <span class="pre">/auth/refresh</span></code></dt>
|
||||
<dd><p>Updates a valid <code class="docutils literal notranslate"><span class="pre">accessToken</span></code>. This request allows you to store not the client’s password, but only the saved <code class="docutils literal notranslate"><span class="pre">accessToken</span></code> value for an almost infinite ability to pass authentication.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>accessToken</strong> (<em>string</em>) – A unique key obtained after authentication.</p></li>
|
||||
<li><p><strong>clientToken</strong> (<em>string</em>) – The unique identifier of the client with respect to which the accessToken was received.</p></li>
|
||||
<li><p><strong>requestUser</strong> (<em>bool</em>) – If the field is passed as <code class="docutils literal notranslate"><span class="pre">true</span></code>, the <code class="docutils literal notranslate"><span class="pre">user</span></code> field will be present in the server response.</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<div class="admonition note">
|
||||
<p class="admonition-title">Note</p>
|
||||
<p>The original protocol also passes the value of <code class="docutils literal notranslate"><span class="pre">selectedProfile</span></code>, but in Mojang’s implementation it doesn’t affect anything. Our authentication server implementation ignores this parameter and relies on <code class="docutils literal notranslate"><span class="pre">accessToken</span></code> and <code class="docutils literal notranslate"><span class="pre">clientToken</span></code> values.</p>
|
||||
</div>
|
||||
<p>If you receive any of the provided errors, you should re-request the user password and perform normal authentication.</p>
|
||||
<p>Successful response:</p>
|
||||
<div class="highlight-javascript notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
||||
<span class="s2">"accessToken"</span><span class="o">:</span> <span class="s2">"Новая_длинная_строка_ содержащая_access_token"</span><span class="p">,</span>
|
||||
<span class="s2">"clientToken"</span><span class="o">:</span> <span class="s2">"Переданный_в_запросе_client_token"</span><span class="p">,</span>
|
||||
<span class="s2">"selectedProfile"</span><span class="o">:</span> <span class="p">{</span>
|
||||
<span class="s2">"id"</span><span class="o">:</span> <span class="s2">"UUID_пользователя_без_дефисов"</span><span class="p">,</span>
|
||||
<span class="s2">"name"</span><span class="o">:</span> <span class="s2">"Текущий_username_пользователя"</span>
|
||||
<span class="p">},</span>
|
||||
<span class="s2">"user"</span><span class="o">:</span> <span class="p">{</span> <span class="cm">/* Только если передан параметр requestUser */</span>
|
||||
<span class="s2">"id"</span><span class="o">:</span> <span class="s2">"UUID_пользователя_без_дефисов"</span><span class="p">,</span>
|
||||
<span class="s2">"username"</span><span class="o">:</span> <span class="s2">"Текущий_username_пользователя"</span><span class="p">,</span>
|
||||
<span class="s2">"properties"</span><span class="o">:</span> <span class="p">[</span>
|
||||
<span class="p">{</span>
|
||||
<span class="s2">"name"</span><span class="o">:</span> <span class="s2">"preferredLanguage"</span><span class="p">,</span>
|
||||
<span class="s2">"value"</span><span class="o">:</span> <span class="s2">"ru"</span>
|
||||
<span class="p">}</span>
|
||||
<span class="p">]</span>
|
||||
<span class="p">}</span>
|
||||
<span class="p">}</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt>
|
||||
<code class="sig-name descname"><span class="pre">POST</span> <span class="pre">/auth/validate</span></code></dt>
|
||||
<dd><p>This request allows you to check whether the specified accessToken is valid or not. This request does not update the token or its lifetime, but only makes sure that it is still valid.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><p><strong>accessToken</strong> (<em>string</em>) – The access token received after authentication.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<p>A successful response will be an empty body. An error will result in a <strong>400</strong> or <strong>401</strong> status. Example of server response when sending an expired token:</p>
|
||||
<div class="highlight-javascript notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
||||
<span class="s2">"error"</span><span class="o">:</span> <span class="s2">"ForbiddenOperationException"</span><span class="p">,</span>
|
||||
<span class="s2">"errorMessage"</span><span class="o">:</span> <span class="s2">"Token expired."</span>
|
||||
<span class="p">}</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt>
|
||||
<code class="sig-name descname"><span class="pre">POST</span> <span class="pre">/auth/signout</span></code></dt>
|
||||
<dd><p>This request enables the invalidation of all tokens issued to the user.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>username</strong> (<em>string</em>) – User’s username or E‑mail (preferable).</p></li>
|
||||
<li><p><strong>password</strong> (<em>string</em>) – User’s password.</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<p>A successful response will be an empty body. Refer to the <strong>error</strong> field in the response body.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt>
|
||||
<code class="sig-name descname"><span class="pre">POST</span> <span class="pre">/auth/invalidate</span></code></dt>
|
||||
<dd><p>The request allows you to invalidate the accessToken. In case the passed token cannot be found in the token store, no error will be generated and you will receive a successful response.</p>
|
||||
<p>Input parameters:</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>accessToken</strong> (<em>string</em>) – A unique key obtained after authentication.</p></li>
|
||||
<li><p><strong>clientToken</strong> (<em>string</em>) – The unique identifier of the client with respect to which the accessToken was received.</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<p>A successful response will be an empty body. Refer to the <strong>error</strong> field in the response body.</p>
|
||||
</dd></dl>
|
||||
|
||||
</div>
|
||||
<div class="section" id="id4">
|
||||
<h2>Authentication on the server<a class="headerlink" href="#id4" title="Permalink to this headline">¶</a></h2>
|
||||
<p>These requests are executed directly by the client and server using internal code or the authlib library (since version 1.7.2). They are only relevant if you have already authorized and run the game with a valid accessToken. You only need to replace the paths inside the game/library with the paths below.</p>
|
||||
<p>Since you cannot directly change anything in authlib or the game, the values passed and server responses are not given here. If necessary, you can find this information yourself on the internet.</p>
|
||||
<div class="section" id="authlib">
|
||||
<h3>Via authlib<a class="headerlink" href="#authlib" title="Permalink to this headline">¶</a></h3>
|
||||
<div class="admonition important">
|
||||
<p class="admonition-title">Important</p>
|
||||
<p>This part of the documentation describes the requests executed via authlib in game version 1.7.2+. For older versions, see the section below.</p>
|
||||
</div>
|
||||
<p>All requests in this category are executed on the /session sublayer. Each request is preceded by the type of request to be sent.</p>
|
||||
<dl class="py function">
|
||||
<dt>
|
||||
<code class="sig-name descname"><span class="pre">POST</span> <span class="pre">/session/join</span></code></dt>
|
||||
<dd><p>A request to this URL is sent by the client at the time of connection to the server that has online-mode=true.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt>
|
||||
<code class="sig-name descname"><span class="pre">GET</span> <span class="pre">/session/hasJoined</span></code></dt>
|
||||
<dd><p>The request to this URL is sent by the server that has online-mode=true after the client tries to connect to it completes the join request. The textures will be signed with the Ely.by key.</p>
|
||||
<p>The signature verification key can be obtained from the <a class="reference internal" href="/en/skins-system.html#signature-verification-key-request"><span class="std std-ref">skins system</span></a>.</p>
|
||||
<div class="admonition attention">
|
||||
<p class="admonition-title">Attention</p>
|
||||
<p>In rare cases the <code class="docutils literal notranslate"><span class="pre">signature</span></code> property will have the value <code class="docutils literal notranslate"><span class="pre">Cg==</span></code>. If the signature field has such value, there is no need to verify it, because it will always be incorrect.</p>
|
||||
</div>
|
||||
</dd></dl>
|
||||
|
||||
</div>
|
||||
<div class="section" id="id5">
|
||||
<h3>For older versions<a class="headerlink" href="#id5" title="Permalink to this headline">¶</a></h3>
|
||||
<div class="admonition important">
|
||||
<p class="admonition-title">Important</p>
|
||||
<p>This part of the documentation describes requests sent by older versions of Minecraft where the Authlib library wasn’t used. These include all versions below 1.7.2.</p>
|
||||
</div>
|
||||
<p>All requests in this category are executed on the /session/legacy sublayer. Each request is preceded by the type of request to be sent.</p>
|
||||
<p>The principle of processing these requests is the same as for authlib, the only difference is in the input parameters and return values.</p>
|
||||
<dl class="py function">
|
||||
<dt>
|
||||
<code class="sig-name descname"><span class="pre">GET</span> <span class="pre">/session/legacy/join</span></code></dt>
|
||||
<dd><p>A request to this URL is sent by the client at the time of connection to the server that has online-mode=true.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt>
|
||||
<code class="sig-name descname"><span class="pre">GET</span> <span class="pre">/session/legacy/hasJoined</span></code></dt>
|
||||
<dd><p>The request to this URL is sent by the server that has online-mode=true after the client trying to connect to it successfully completes the join request.</p>
|
||||
</dd></dl>
|
||||
|
||||
<p>It is important not to forget the GET parameter <strong>?user=</strong> at the end of both requests to get the following URLs: <code class="docutils literal notranslate"><span class="pre">http://minecraft.ely.by/session/legacy/hasJoined?user=</span></code>.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="id6">
|
||||
<h2>Single player<a class="headerlink" href="#id6" title="Permalink to this headline">¶</a></h2>
|
||||
<p>In essence, a single-player game is a local server created for a single player. At least it has been so since version 1.6, in which the local server mechanism was introduced.</p>
|
||||
<p>However, the following request is relevant only for Minecraft 1.7.6+, when Authlib started to be used for loading skins.</p>
|
||||
<span class="target" id="profile-request"></span><dl class="py function">
|
||||
<dt>
|
||||
<code class="sig-name descname"><span class="pre">GET</span> <span class="pre">/session/profile/{uuid}</span></code></dt>
|
||||
<dd><p>A request to this URL is sent by the client in a single-player game on a local server (created through the game itself). The UUID of the user with whom the client was launched is passed to the URL, and the response is information about the player’s textures in the same format as the hasJoined request.</p>
|
||||
</dd></dl>
|
||||
|
||||
</div>
|
||||
<div class="section" id="id7">
|
||||
<h2>Prebuilt Authlib libraries<a class="headerlink" href="#id7" title="Permalink to this headline">¶</a></h2>
|
||||
<div class="admonition attention">
|
||||
<p class="admonition-title">Attention</p>
|
||||
<p>Ely.by supports the authlib-injector library. This is the simplest and most universal way to install the authentication system in the game and its servers. For details, see :doc:` the corresponding documentation section <authlib-injector>`.</p>
|
||||
</div>
|
||||
<p>Since manual implementation has difficulties in finding sources, connecting dependencies and finally compiling the result, on the <a class="reference external" href="https://ely.by/load">download page of our skin system</a> you can download pre-built libraries with all necessary modifications. Select the desired version from the drop-down list and follow the installation instructions on the same page below.</p>
|
||||
<p>In earlier versions of the game, the skin system was inside the game client, so the libraries below only provide authentication:</p>
|
||||
<ul class="simple">
|
||||
<li><p>Minecraft 1.7.5 - <a class="reference download internal" download="" href="/_downloads/ef940186495aa507c548b1a0a96c2867/authlib-1.3.1.jar"><code class="xref download docutils literal notranslate"><span class="pre">authlib</span> <span class="pre">1.3.1</span></code></a></p></li>
|
||||
<li><p>Minecraft 1.7.2 - <a class="reference download internal" download="" href="/_downloads/176af30a246da419bd7cc8f9571f5c60/authlib-1.3.jar"><code class="xref download docutils literal notranslate"><span class="pre">authlib</span> <span class="pre">1.3</span></code></a></p></li>
|
||||
</ul>
|
||||
<p>To install, you need to replace the original library located at <code class="docutils literal notranslate"><span class="pre"><Minecraft</span> <span class="pre">installation</span> <span class="pre">directory>/libraries/com/mojang/authlib/</span></code>. Make sure that the versions of the already present and replacement files match.</p>
|
||||
</div>
|
||||
<div class="section" id="install-server">
|
||||
<span id="id9"></span><h2>Installing Authlib on a server<a class="headerlink" href="#install-server" title="Permalink to this headline">¶</a></h2>
|
||||
<p>The server also uses authlib to perform player authentication, so the appropriate changes should be applied to it as well. Below are instructions on how to install authlib for different Minecraft server implementations.</p>
|
||||
<div class="admonition note">
|
||||
<p class="admonition-title">Note</p>
|
||||
<p>If none of the instructions below work for your server implementation, please create a <a class="reference external" href="https://github.com/elyby/docs/issues/new">new issue</a> and we will append the instructions for your server.</p>
|
||||
</div>
|
||||
<div class="section" id="vanilla">
|
||||
<span id="id10"></span><h3>Vanilla server<a class="headerlink" href="#vanilla" title="Permalink to this headline">¶</a></h3>
|
||||
<p>Use an archiver to open the server file <code class="docutils literal notranslate"><span class="pre">minecraft_server.VERSION.jar</span></code>. In the same way, open the archive with authlib for the corresponding server version. You will see two windows in front of you: one with the server files, the other with the authlib files. You need to “drag and drop” all files and folders from the authlib archive, <strong>except for the META-INF</strong> directory, and confirm the replacement.</p>
|
||||
<div class="figure align-center" id="id17">
|
||||
<img alt="Процесс установки Authlib" src="/_images/authlib-install.png">
|
||||
<p class="caption"><span class="caption-text">Please note: you should “drag and drop” the content below the server folders (into the .class file area).</span><a class="headerlink" href="#id17" title="Permalink to this image">¶</a></p>
|
||||
</div>
|
||||
<p>After these steps, you can close both windows and set <code class="docutils literal notranslate"><span class="pre">online-mode=true</span></code> in the <code class="docutils literal notranslate"><span class="pre">server.properties</span></code> file.</p>
|
||||
</div>
|
||||
<div class="section" id="bukkit-spigot">
|
||||
<h3>Bukkit/Spigot<a class="headerlink" href="#bukkit-spigot" title="Permalink to this headline">¶</a></h3>
|
||||
<p>First perform the installation as described for the <a class="reference external" href="#vanilla">original server</a>. Then download the libraries <a class="reference external" href="https://repo1.maven.org/maven2/commons-io/commons-io/2.5/commons-io-2.5.jar">commons-io</a> and <a class="reference external" href="https://repo1.maven.org/maven2/org/apache/commons/commons-lang3/3.5/commons-lang3-3.5.jar">commons-lang3</a>, and then move the contents of the downloaded archives into the server files in the same way as authlib.</p>
|
||||
</div>
|
||||
<div class="section" id="forge-sponge">
|
||||
<h3>Forge/Sponge<a class="headerlink" href="#forge-sponge" title="Permalink to this headline">¶</a></h3>
|
||||
<p>Before performing the installation, it is necessary to determine which file is to be modified:</p>
|
||||
<ul class="simple">
|
||||
<li><p><strong>>=1.16</strong>: <code class="docutils literal notranslate"><span class="pre">`libraries/net/minecraft/server/VERSION-DIGITS/server-VERSION-DIGITS-extra.jar</span></code>.</p></li>
|
||||
<li><p><strong>1.13-1.15</strong>: <code class="docutils literal notranslate"><span class="pre">`libraries/net/minecraft/server/VERSION/server-VERSION-extra.jar</span></code>.</p></li>
|
||||
<li><p><strong><=1.12</strong>: <code class="docutils literal notranslate"><span class="pre">minecraft_server.VERSION.jar</span></code>.</p></li>
|
||||
</ul>
|
||||
<p>When the required file is found, perform an authlib installation for it, similar to <a class="reference external" href="#vanilla">original server</a>.</p>
|
||||
</div>
|
||||
<div class="section" id="paper-paperspigot">
|
||||
<h3>Paper (PaperSpigot)<a class="headerlink" href="#paper-paperspigot" title="Permalink to this headline">¶</a></h3>
|
||||
<p>Installation is done similarly to <code class="docutils literal notranslate"><span class="pre">Bukkit/Spigot</span> <span class="pre"><#bukkit-spigot>`_</span> <span class="pre">into</span> <span class="pre">the</span> <span class="pre">``cache/patched-VERSION.jar</span></code> file. After making changes, the server must be started via the jar file from the <code class="docutils literal notranslate"><span class="pre">cache</span></code> directory, because otherwise <strong>Paper will restore the original state of the file</strong>:</p>
|
||||
<div class="line-block">
|
||||
<div class="line">Before: <code class="docutils literal notranslate"><span class="pre">java</span> <span class="pre">-jar</span> <span class="pre">paper-VERSION-BUILD.jar</span></code></div>
|
||||
<div class="line">After: <code class="docutils literal notranslate"><span class="pre">java</span> <span class="pre">-jar</span> <span class="pre">cache/patched-VERSION.jar</span></code></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="bungeecord">
|
||||
<h2>BungeeCord<a class="headerlink" href="#bungeecord" title="Permalink to this headline">¶</a></h2>
|
||||
<div class="admonition hint">
|
||||
<p class="admonition-title">Hint</p>
|
||||
<p>You can use the <a class="reference internal" href="/en/authlib-injector.html"><span class="doc">authlib-injector</span></a> library to install the authentication system without modifying the server internals.</p>
|
||||
</div>
|
||||
<p>Although BungeeCord is a proxy server, it performs player authentication on its own. Unfortunately, BungeeCord does not rely on Authlib, but implements the authentication process by itself, so you will need to modify the compiled <code class="docutils literal notranslate"><span class="pre">.class</span></code> files to install the Ely.by authentication system.</p>
|
||||
<p>Follow the instructions below to install:</p>
|
||||
<ol class="arabic">
|
||||
<li><p>Download the InClassTranslator program (we don’t give direct links, but it’s easy to find).</p></li>
|
||||
<li><p>Use an archiver to open the <code class="docutils literal notranslate"><span class="pre">BungeeCord.jar</span></code> file.</p></li>
|
||||
<li><p>Go to the path <code class="docutils literal notranslate"><span class="pre">net/md_5/bungee/connection</span></code> and find there the file <code class="docutils literal notranslate"><span class="pre">InitialHandler.class</span></code> (without any $ symbols).</p></li>
|
||||
<li><p>Unpack this file. In the simplest case you can do it by simply “pulling” it out of the archiver window.</p></li>
|
||||
<li><p>Open the extracted file in the InClassTranslator program and replace the line <code class="docutils literal notranslate"><span class="pre">https://sessionserver.mojang.com/session/minecraft/hasJoined?username=</span></code> with <code class="docutils literal notranslate"><span class="pre">https://authserver.ely.by/session/hasJoined?username=</span></code> as shown in the figure below:</p>
|
||||
<div class="figure align-center">
|
||||
<img alt="Редактирование в InClassTranslator" src="/_images/bungeecord_inclasstranslator.png">
|
||||
</div>
|
||||
</li>
|
||||
<li><p>Save the changes and drag the modified file back into the server archive. Confirm the replacement.</p>
|
||||
<div class="figure align-center">
|
||||
<img alt="Перетаскивание отредактированного файла назад в архив" src="/_images/bungeecord_move.png">
|
||||
</div>
|
||||
</li>
|
||||
</ol>
|
||||
<p>After performing these steps, you can specify the value <code class="docutils literal notranslate"><span class="pre">online_mode=true</span></code> in the BungeeCord configuration file (<code class="docutils literal notranslate"><span class="pre">config.yml</span></code>).</p>
|
||||
<div class="admonition important">
|
||||
<p class="admonition-title">Important</p>
|
||||
<p>We also recommend performing an Authlib installation on all servers behind BungeeCord. This may be necessary for plugins that use the Mojang API. Instructions for installing on proxied servers are given <a class="reference external" href="#install-server">above</a>.</p>
|
||||
<p>All servers must have <code class="docutils literal notranslate"><span class="pre">online-mode=false</span></code> in their configuration (<code class="docutils literal notranslate"><span class="pre">server.properties</span></code>), since users are already authorized by BungeeCord.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="id15">
|
||||
<h2>Installation on versions below 1.7.2<a class="headerlink" href="#id15" title="Permalink to this headline">¶</a></h2>
|
||||
<p>For older versions there are quite a large variety of different cases, and it is not possible to cover them in this documentation. The whole setup consists of replacing certain strings in certain classes via InClassTranslator.</p>
|
||||
<p>There is a great post on the RuBukkit forum, which contains all the necessary information on class names on different versions of Minecraft. There is no point in retyping it here, so just go to its page and find the right version.</p>
|
||||
<p><a href="http://www.rubukkit.org/threads/spisok-klassov-i-klientov-dlja-mcp.25108/#post-303710" target="_blank">RuBukkit -
|
||||
Список классов и клиентов для MCP</a>.</p>
|
||||
<div class="section" id="id16">
|
||||
<h3>Installation example<a class="headerlink" href="#id16" title="Permalink to this headline">¶</a></h3>
|
||||
<p>Suppose you want to install authentication on a server with version 1.5.2.</p>
|
||||
<p>First you follow the link above, select the version you want (1.5.2) and see the list of classes:</p>
|
||||
<ul class="simple">
|
||||
<li><p><strong>bdk.class</strong> - path to joinserver</p></li>
|
||||
<li><p><strong>jg.class</strong> - path to checkserver</p></li>
|
||||
</ul>
|
||||
<p>Then you have to take the .jar file of the client and open it with any archiver. After that you need to find the <strong>bdk.class</strong> file. For this purpose it is convenient to use search.</p>
|
||||
<p>Once you have found the file, you need to extract it from the archive - just drag and drop it from there to a convenient dirctory.</p>
|
||||
<p>Next, run InClassTranslator and open this class in it. On the left will be a list of lines found in the file, which you can change. You only need to change the line responsible for the request to connect to the server:</p>
|
||||
<div class="figure align-center">
|
||||
<img alt="Порядок редактирования: выбрать нужную строку, изменить, сохранить." src="/_images/installing_by_inclasstranslator.png">
|
||||
</div>
|
||||
<p>After that, you need to put the modified .class back into the game’s .jar file.</p>
|
||||
<p>You need to perform the same operation with the server, only replace the reference with hasJoined.</p>
|
||||
<hr class="docutils">
|
||||
<p>After these actions you need to enable online-mode=true in the settings and the server will allow only those players who will be authorized through Ely.by.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<footer>
|
||||
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
|
||||
<a href="/en/oauth.html" class="btn btn-neutral float-right" title="Authorization via OAuth2 protocol" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
|
||||
<a href="/en/authlib-injector.html" class="btn btn-neutral float-left" title="Authlib-injector" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
© Copyright 2024, Ely.by.
|
||||
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
|
||||
|
||||
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
|
||||
|
||||
provided by <a href="https://readthedocs.org">Read the Docs</a>.
|
||||
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function () {
|
||||
SphinxRtdTheme.Navigation.enable(true);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-45299905-2"></script>
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
gtag('js', new Date());
|
||||
|
||||
gtag('config', 'UA-45299905-2');
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
638
en/oauth.html
Normal file
638
en/oauth.html
Normal file
@@ -0,0 +1,638 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Authorization via OAuth2 protocol — Ely.by Docs</title>
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="/_static/css/theme.css" type="text/css">
|
||||
<link rel="stylesheet" href="/_static/pygments.css" type="text/css">
|
||||
<link rel="stylesheet" href="/_static/style.css" type="text/css">
|
||||
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="/_static/favicon.ico">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="_static/js/html5shiv.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
<script type="text/javascript" id="documentation_options" data-url_root="./" src="/en/_static/documentation_options.js"></script>
|
||||
<script src="/_static/jquery.js"></script>
|
||||
<script src="/_static/underscore.js"></script>
|
||||
<script src="/_static/doctools.js"></script>
|
||||
|
||||
<script type="text/javascript" src="/_static/js/theme.js"></script>
|
||||
|
||||
|
||||
<link rel="index" title="Index" href="/en/genindex.html">
|
||||
<link rel="search" title="Search" href="/en/search.html">
|
||||
<link rel="next" title="Skins system" href="/en/skins-system.html">
|
||||
<link rel="prev" title="Authentication for Minecraft" href="/en/minecraft-auth.html">
|
||||
</head>
|
||||
|
||||
<body class="wy-body-for-nav">
|
||||
|
||||
|
||||
<div class="wy-grid-for-nav">
|
||||
|
||||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||||
<div class="wy-side-scroll">
|
||||
<div class="wy-side-nav-search">
|
||||
|
||||
|
||||
|
||||
<a href="/en/index.html" class="icon icon-home"> Ely.by Documentation
|
||||
|
||||
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div role="search">
|
||||
<form id="rtd-search-form" class="wy-form" action="/en/search.html" method="get">
|
||||
<input type="text" name="q" placeholder="Search docs">
|
||||
<input type="hidden" name="check_keywords" value="yes">
|
||||
<input type="hidden" name="area" value="default">
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="caption"><span class="caption-text">English articles:</span></p>
|
||||
<ul class="current">
|
||||
<li class="toctree-l1"><a class="reference internal" href="/en/api.html">Ely.by API (Mojang API simulation)</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/en/authlib-injector.html">Authlib-injector</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/en/minecraft-auth.html">Authentication for Minecraft</a></li>
|
||||
<li class="toctree-l1 current"><a class="current reference internal" href="#">Authorization via OAuth2 protocol</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#id1">Application registration</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#id3">Authorization initiation</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#authorization-code-grant">Exchange auth code for a access key</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#authorization-code-grant-response">Server response</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#id8">Getting user information</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#refresh-token-grant">Refreshing access token</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#id12">Available libraries</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#id13">Possible errors</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#auth-start-errors">Errors during authorization initiation</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#issue-token-errors">Errors when exchanging code for a key</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#id18">Errors when requesting user information</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#id19">Errors while updating access token</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/en/skins-system.html">Skins system</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="caption"><span class="caption-text">Статьи на русском:</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/ru/api.html">Ely.by API (симуляция Mojang API)</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/ru/authlib-injector.html">Authlib-injector</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/ru/minecraft-auth.html">Авторизация для Minecraft</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/ru/oauth.html">Авторизация по протоколу OAuth2</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/ru/skins-system.html">Система скинов</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||
|
||||
|
||||
<nav class="wy-nav-top" aria-label="top navigation">
|
||||
|
||||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||
<a href="/en/index.html">Ely.by Documentation</a>
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
<div class="wy-nav-content">
|
||||
|
||||
<div class="rst-content">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div role="navigation" aria-label="breadcrumbs navigation">
|
||||
|
||||
<ul class="wy-breadcrumbs">
|
||||
|
||||
<li><a href="/en/index.html" class="icon icon-home"></a> »</li>
|
||||
|
||||
<li>Authorization via OAuth2 protocol</li>
|
||||
|
||||
|
||||
<li class="wy-breadcrumbs-aside">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<hr>
|
||||
</div>
|
||||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||||
<div itemprop="articleBody">
|
||||
|
||||
<div class="section" id="oauth2">
|
||||
<h1>Authorization via OAuth2 protocol<a class="headerlink" href="#oauth2" title="Permalink to this headline">¶</a></h1>
|
||||
<p>On this page you’ll find how to implement OAuth2 authorization on your project through the Ely.by Accounts service. The implementation of this protocol will allow your users to authorize using their Ely.by account.</p>
|
||||
<div class="section" id="id1">
|
||||
<h2>Application registration<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h2>
|
||||
<p>First you need to <a class="reference external" href="https://account.ely.by/dev/applications/new">create a new application</a>. Select <strong>Website</strong> as the application type. For the <em>Redirect URI</em> you can get away with just specifying the domain, but to increase security it’s advised to use the full redirect path. Here are examples of valid addresses:</p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="docutils literal notranslate"><span class="pre">http://site.com</span></code></p></li>
|
||||
<li><p><code class="docutils literal notranslate"><span class="pre">http://site.com/oauth/ely</span></code></p></li>
|
||||
<li><p><code class="docutils literal notranslate"><span class="pre">http://site.com/oauth.php?provider=ely</span></code></p></li>
|
||||
</ul>
|
||||
<p>After a successful creation of an application, you’ll be taken to the page containing a list of all your applications. If you click on the name of an application you’ll see its <code class="docutils literal notranslate"><span class="pre">clientId</span></code> identifier and its <code class="docutils literal notranslate"><span class="pre">clientSecret</span></code> secret. They’ll become important in later steps.</p>
|
||||
</div>
|
||||
<div class="section" id="id3">
|
||||
<h2>Authorization initiation<a class="headerlink" href="#id3" title="Permalink to this headline">¶</a></h2>
|
||||
<p>To initiate the authorization flow, you’ll have to redirect the user to the following URL:</p>
|
||||
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>https://account.ely.by/oauth2/v1?client_id=<clientId>&redirect_uri=<redirectUri>&response_type=code&scope=<scopesList>
|
||||
</pre></div>
|
||||
</div>
|
||||
<table class="colwidths-given docutils align-default" id="id21">
|
||||
<caption><span class="caption-text">Valid query parameters</span><a class="headerlink" href="#id21" title="Permalink to this table">¶</a></caption>
|
||||
<colgroup>
|
||||
<col style="width: 1%">
|
||||
<col style="width: 1%">
|
||||
<col style="width: 98%">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr class="row-odd"><th class="head"><p>Parameter</p></th>
|
||||
<th class="head"><p>Value example</p></th>
|
||||
<th class="head"><p>Description</p></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="row-even"><td><p><em>clientId</em></p></td>
|
||||
<td><p><code class="docutils literal notranslate"><span class="pre">ely</span></code></p></td>
|
||||
<td><p><strong>Required</strong>. ClientId that was received during registration.</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p><em>redirect_uri</em></p></td>
|
||||
<td><p><code class="docutils literal notranslate"><span class="pre">http://site.com/oauth.php</span></code></p></td>
|
||||
<td><p><strong>Required</strong>. Return-forwarding address, which matches the address specified during the application registration</p></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><p><em>response_type</em></p></td>
|
||||
<td><p><code class="docutils literal notranslate"><span class="pre">code</span></code></p></td>
|
||||
<td><p><strong>Required</strong>. Response type. At the moment, only <code class="docutils literal notranslate"><span class="pre">code</span></code> is supported.</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p><em>scope</em></p></td>
|
||||
<td><p><code class="docutils literal notranslate"><span class="pre">account_info</span> <span class="pre">account_email</span></code></p></td>
|
||||
<td><p><strong>Required</strong>. The list of permissions that you want to access, separated by spaces. See all available permissions in the <a class="reference external" href="#available-scopes">section below</a>.</p></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><p><em>state</em></p></td>
|
||||
<td><p><code class="docutils literal notranslate"><span class="pre">isfvubuysdboinsbdfvit</span></code></p></td>
|
||||
<td><p>Randomly generated string. Used as a session identifier to increase security. Will be returned unchanged after authorization is completed.</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p><em>description</em></p></td>
|
||||
<td><p><code class="docutils literal notranslate"><span class="pre">यो</span> <span class="pre">अनुप्रयोग</span> <span class="pre">विवरण</span></code></p></td>
|
||||
<td><p>If your application is available in several languages, you can use this field to override the default description in accordance with user’s preferred language.</p></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><p><em>prompt</em></p></td>
|
||||
<td><p><code class="docutils literal notranslate"><span class="pre">consent</span></code> or <code class="docutils literal notranslate"><span class="pre">select_account</span></code></p></td>
|
||||
<td><p>Forcibly display the request for permissions (<code class="docutils literal notranslate"><span class="pre">consent</span></code>) or forcibly request an account selection (<code class="docutils literal notranslate"><span class="pre">select_account</span></code>).</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p><em>login_hint</em></p></td>
|
||||
<td><p><code class="docutils literal notranslate"><span class="pre">erickskrauch</span></code> or <code class="docutils literal notranslate"><span class="pre">erickskrauch@ely.by</span></code></p></td>
|
||||
<td><p>If a user has several accounts, then specifying username or user email in this parameter will automatically select corresponding account. This is useful in a case of re-login after the token has expired.</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<span id="available-scopes"></span><table class="colwidths-given docutils align-default" id="id22">
|
||||
<caption><span class="caption-text">List of available scopes</span><a class="headerlink" href="#id22" title="Permalink to this table">¶</a></caption>
|
||||
<colgroup>
|
||||
<col style="width: 1%">
|
||||
<col style="width: 99%">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr class="row-odd"><td><p><strong>account_info</strong></p></td>
|
||||
<td><p>Get user information.</p></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><p><strong>account_email</strong></p></td>
|
||||
<td><p>Response to a request for user information will also contain user’s E-mail address.</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p><strong>offline_access</strong></p></td>
|
||||
<td><p>With an <code class="docutils literal notranslate"><span class="pre">access_token</span></code> you will also recieve a <code class="docutils literal notranslate"><span class="pre">refresh_token</span></code>. See more at <a class="reference external" href="#refresh-token-grant">the corresponding section</a>.</p></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><p><strong>minecraft_server_session</strong></p></td>
|
||||
<td><p>It will be possible to use <code class="docutils literal notranslate"><span class="pre">access_token</span></code> as a session identifier for the Minecraft.</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<hr class="docutils">
|
||||
<p>After creating the link, place it in your template:</p>
|
||||
<div class="highlight-html notranslate"><div class="highlight"><pre><span></span><span class="p"><</span><span class="nt">a</span> <span class="na">href</span><span class="o">=</span><span class="s">"<ваша_ссылка>"</span><span class="p">></span>Войти через Ely.by<span class="p"></</span><span class="nt">a</span><span class="p">></span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>After clicking on the URL a user will be redirected to our login page after which they’ll be redirected back to the address specified in the <code class="docutils literal notranslate"><span class="pre">redirect_uri</span></code> parameter.</p>
|
||||
<p>Reverse redirection returns as <code class="docutils literal notranslate"><span class="pre"><redirect_uri>?code=<auth_code>&state=<state></span></code> for a successful authorization and <code class="docutils literal notranslate"><span class="pre"><redirect_uri?error=<error_identifier>&error_message=<error_description></span></code> for a failed one.</p>
|
||||
<p>Examples of successful and unsuccessful redirects:</p>
|
||||
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>http://site.com/oauth/ely.php?code=dkpEEVtXBdIcgdQWak4SOPEpTJIvYa8KIq5cW9GJ&state=ajckasdcjasndckbsadc
|
||||
http://site.com/oauth/ely.php?error=access_denied&error_message=The+resource+owner+or+authorization+server+denied+the+request.
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="authorization-code-grant">
|
||||
<span id="id6"></span><h2>Exchange auth code for a access key<a class="headerlink" href="#authorization-code-grant" title="Permalink to this headline">¶</a></h2>
|
||||
<p>After receiving an authorization code (<code class="docutils literal notranslate"><span class="pre">auth_code</span></code>), you’ll need to exchange it for an authorization key (<code class="docutils literal notranslate"><span class="pre">access_key</span></code>). To do this, you must perform a POST request to the URL:</p>
|
||||
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>https://account.ely.by/api/oauth2/v1/token
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>And pass in following parameters:</p>
|
||||
<table class="colwidths-given docutils align-default">
|
||||
<colgroup>
|
||||
<col style="width: 1%">
|
||||
<col style="width: 99%">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">client_id</span></code></p></td>
|
||||
<td><p>ClientID that was received during registration.</p></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">client_secret</span></code></p></td>
|
||||
<td><p>ClientSecret that was received during application registration.</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">redirect_uri</span></code></p></td>
|
||||
<td><p>The exact URI that was used for user redirection.</p></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">grant_type</span></code></p></td>
|
||||
<td><p>In this case, <code class="docutils literal notranslate"><span class="pre">authorization_code</span></code> should be used.</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">code</span></code></p></td>
|
||||
<td><p>Authorization code received in GET params after successful redirect.</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p><strong>An example of the exchange in PHP:</strong></p>
|
||||
<div class="highlight-php notranslate"><div class="highlight"><pre><span></span><span class="cp"><?php</span>
|
||||
<span class="c1">// В этой переменной будут храниться ваши параметры OAuth2</span>
|
||||
<span class="nv">$oauthParams</span> <span class="o">=</span> <span class="p">[</span>
|
||||
<span class="s1">'client_id'</span> <span class="o">=></span> <span class="s1">'ely'</span><span class="p">,</span> <span class="c1">// Ваш ClientId, полученный при регистрации</span>
|
||||
<span class="s1">'client_secret'</span> <span class="o">=></span> <span class="s1">'Pk4uCtZw5WVlSUpvteJuTZkVqHXZ6aNtTaLPXa7X'</span><span class="p">,</span> <span class="c1">// Ваш ClientSecret, полученный при регистрации</span>
|
||||
<span class="s1">'redirect_uri'</span> <span class="o">=></span> <span class="s1">'http://someresource.by/oauth/some.php'</span><span class="p">,</span> <span class="c1">// Адрес, на который вы ожидаете получить пользователя обратно (текущий url)</span>
|
||||
<span class="s1">'grant_type'</span> <span class="o">=></span> <span class="s1">'authorization_code'</span><span class="p">,</span>
|
||||
<span class="p">];</span>
|
||||
|
||||
<span class="c1">// Если возникла ошибка, то прерываем выполнение скрипта</span>
|
||||
<span class="k">if</span> <span class="p">(</span><span class="nb">isset</span><span class="p">(</span><span class="nv">$_GET</span><span class="p">[</span><span class="s1">'error'</span><span class="p">]))</span> <span class="p">{</span>
|
||||
<span class="k">echo</span> <span class="nv">$_GET</span><span class="p">[</span><span class="s1">'error_message'</span><span class="p">];</span>
|
||||
<span class="k">return</span><span class="p">;</span>
|
||||
<span class="p">}</span>
|
||||
|
||||
<span class="c1">// Выполняем код ниже только если пришёл код авторизации</span>
|
||||
<span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="nb">is_null</span><span class="p">(</span><span class="nv">$_GET</span><span class="p">[</span><span class="s1">'code'</span><span class="p">]))</span> <span class="p">{</span>
|
||||
<span class="nv">$oauthParams</span><span class="p">[</span><span class="s1">'code'</span><span class="p">]</span> <span class="o">=</span> <span class="nv">$_GET</span><span class="p">[</span><span class="s1">'code'</span><span class="p">];</span>
|
||||
|
||||
<span class="nv">$curl</span> <span class="o">=</span> <span class="nb">curl_init</span><span class="p">();</span>
|
||||
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$curl</span><span class="p">,</span> <span class="nx">CURLOPT_URL</span><span class="p">,</span> <span class="s1">'https://account.ely.by/api/oauth2/v1/token'</span><span class="p">);</span>
|
||||
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$curl</span><span class="p">,</span> <span class="nx">CURLOPT_RETURNTRANSFER</span><span class="p">,</span> <span class="k">true</span><span class="p">);</span>
|
||||
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$curl</span><span class="p">,</span> <span class="nx">CURLOPT_POST</span><span class="p">,</span> <span class="k">true</span><span class="p">);</span>
|
||||
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$curl</span><span class="p">,</span> <span class="nx">CURLOPT_POSTFIELDS</span><span class="p">,</span> <span class="nb">http_build_query</span><span class="p">(</span><span class="nv">$oauthParams</span><span class="p">));</span>
|
||||
<span class="nv">$out</span> <span class="o">=</span> <span class="nb">json_decode</span><span class="p">(</span><span class="nb">curl_exec</span><span class="p">(</span><span class="nv">$curl</span><span class="p">),</span> <span class="k">true</span><span class="p">);</span>
|
||||
<span class="nb">curl_close</span><span class="p">(</span><span class="nv">$curl</span><span class="p">);</span>
|
||||
<span class="p">}</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Notes to the code:</p>
|
||||
<ul class="simple">
|
||||
<li><p>First, we declare the <code class="docutils literal notranslate"><span class="pre">$oauthParams</span></code> variable which will store the values that we got after registering the application.</p></li>
|
||||
<li><p>Then we check if there was an error. In which case, we immediately stop the execution.</p></li>
|
||||
<li><p>Then we create a POST request to exchange the <code class="docutils literal notranslate"><span class="pre">code</span></code> for an <code class="docutils literal notranslate"><span class="pre">access_token</span></code>, passing all required fields in the process.</p></li>
|
||||
<li><p>Then we execute the request, get the answer and parse it from JSON into the associative array.</p></li>
|
||||
</ul>
|
||||
<div class="section" id="authorization-code-grant-response">
|
||||
<span id="id7"></span><h3>Server response<a class="headerlink" href="#authorization-code-grant-response" title="Permalink to this headline">¶</a></h3>
|
||||
<p>In case of a successful request, the response body will contain the result of exchanging the authorization code for an <code class="docutils literal notranslate"><span class="pre">access_token</span></code>. Data is a JSON document and can be easily interpreted by tools of a used programming language.</p>
|
||||
<p>The JSON document body will contain the following fields:</p>
|
||||
<div class="highlight-javascript notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
||||
<span class="s2">"access_token"</span><span class="o">:</span> <span class="s2">"4qlktsEiwgspKEAotazem0APA99Ee7E6jNryVBrZ"</span><span class="p">,</span>
|
||||
<span class="s2">"refresh_token"</span><span class="o">:</span> <span class="s2">"m0APA99Ee7E6jNryVBrZ4qlktsEiwgspKEAotaze"</span><span class="p">,</span> <span class="c1">// Представлен только в случае запроса с правами offline_access</span>
|
||||
<span class="s2">"token_type"</span><span class="o">:</span> <span class="s2">"Bearer"</span><span class="p">,</span>
|
||||
<span class="s2">"expires_in"</span><span class="o">:</span> <span class="mf">86400</span> <span class="c1">// Количество секунд, на которое выдан токен</span>
|
||||
<span class="p">}</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>At this process authorization procedure is over. The resulting <code class="docutils literal notranslate"><span class="pre">access_token</span></code> can be used to obtain user information and to interact with our API.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="id8">
|
||||
<h2>Getting user information<a class="headerlink" href="#id8" title="Permalink to this headline">¶</a></h2>
|
||||
<p>If the received token has the <code class="docutils literal notranslate"><span class="pre">account_info</span></code> scope, then you can request information about the user’s account. To do it, you have to send a request to the URL:</p>
|
||||
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>https://account.ely.by/api/account/v1/info
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>To send <code class="docutils literal notranslate"><span class="pre">access_token</span></code>, the <code class="docutils literal notranslate"><span class="pre">Authorization</span></code> header is used with the value of <code class="docutils literal notranslate"><span class="pre">Bearer</span> <span class="pre">{access_token}</span></code>.</p>
|
||||
<p><strong>An example of getting user information in PHP:</strong></p>
|
||||
<div class="highlight-php notranslate"><div class="highlight"><pre><span></span><span class="cp"><?php</span>
|
||||
<span class="nv">$accessToken</span> <span class="o">=</span> <span class="s1">'some_access_token_value'</span><span class="p">;</span>
|
||||
|
||||
<span class="nv">$curl</span> <span class="o">=</span> <span class="nb">curl_init</span><span class="p">();</span>
|
||||
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$curl</span><span class="p">,</span> <span class="nx">CURLOPT_URL</span><span class="p">,</span> <span class="s1">'https://account.ely.by/api/account/v1/info'</span><span class="p">);</span>
|
||||
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$curl</span><span class="p">,</span> <span class="nx">CURLOPT_RETURNTRANSFER</span><span class="p">,</span> <span class="k">true</span><span class="p">);</span>
|
||||
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$curl</span><span class="p">,</span> <span class="nx">CURLOPT_HTTPHEADER</span><span class="p">,</span> <span class="p">[</span>
|
||||
<span class="s1">'Authorization: Bearer '</span> <span class="o">.</span> <span class="nv">$accessToken</span><span class="p">,</span>
|
||||
<span class="p">]);</span>
|
||||
<span class="nv">$result</span> <span class="o">=</span> <span class="nb">json_decode</span><span class="p">(</span><span class="nb">curl_exec</span><span class="p">(</span><span class="nv">$curl</span><span class="p">),</span> <span class="k">true</span><span class="p">);</span>
|
||||
<span class="nb">curl_close</span><span class="p">(</span><span class="nv">$curl</span><span class="p">);</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>In response, you will receive a JSON document with the following contents:</p>
|
||||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
||||
<span class="nt">"id"</span><span class="p">:</span> <span class="mi">1</span><span class="p">,</span>
|
||||
<span class="nt">"uuid"</span><span class="p">:</span> <span class="s2">"ffc8fdc9-5824-509e-8a57-c99b940fb996"</span><span class="p">,</span>
|
||||
<span class="nt">"username"</span><span class="p">:</span> <span class="s2">"ErickSkrauch"</span><span class="p">,</span>
|
||||
<span class="nt">"registeredAt"</span><span class="p">:</span> <span class="mi">1470566470</span><span class="p">,</span>
|
||||
<span class="nt">"profileLink"</span><span class="p">:</span> <span class="s2">"http:\/\/ely.by\/u1"</span><span class="p">,</span>
|
||||
<span class="nt">"preferredLanguage"</span><span class="p">:</span> <span class="s2">"be"</span><span class="p">,</span>
|
||||
<span class="nt">"email"</span><span class="p">:</span> <span class="s2">"erickskrauch@ely.by"</span>
|
||||
<span class="p">}</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Note that the <code class="docutils literal notranslate"><span class="pre">email</span></code> field will only be present when the <code class="docutils literal notranslate"><span class="pre">account_email</span></code> scope has been requested.</p>
|
||||
<div class="admonition note">
|
||||
<p class="admonition-title">Note</p>
|
||||
<p>In the future, the number of returned fields may increase, but existing ones will remain the same.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="refresh-token-grant">
|
||||
<span id="id9"></span><h2>Refreshing access token<a class="headerlink" href="#refresh-token-grant" title="Permalink to this headline">¶</a></h2>
|
||||
<p>If you have requested the scope <code class="docutils literal notranslate"><span class="pre">offline_access</span></code> during authorization, then along with your <code class="docutils literal notranslate"><span class="pre">access_token</span></code> you’ll also get <code class="docutils literal notranslate"><span class="pre">refresh_token</span></code>. This token doesn’t expire and can be used to obtain a new access token when that one expires.</p>
|
||||
<p>To perform a token update, you have to send a POST request to the same URL that was used for <a class="reference external" href="#authorization-code-grant">exchanging the auth code for an access token</a>, but with the next parameters:</p>
|
||||
<table class="colwidths-given docutils align-default">
|
||||
<colgroup>
|
||||
<col style="width: 1%">
|
||||
<col style="width: 99%">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">client_id</span></code></p></td>
|
||||
<td><p>ClientID that was received during registration.</p></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">client_secret</span></code></p></td>
|
||||
<td><p>ClientSecret that was received during application registration.</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">scope</span></code></p></td>
|
||||
<td><p>The same scopes that were obtained for the initial access token. An attempt to extend this list will cause an error.</p></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">refresh_token</span></code></p></td>
|
||||
<td><p>The token itself that was obtained along with the access token.</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p><strong>Example of a token refreshing in PHP:</strong></p>
|
||||
<div class="highlight-php notranslate"><div class="highlight"><pre><span></span><span class="cp"><?php</span>
|
||||
<span class="c1">// refresh_token, полученный при завершении авторизации</span>
|
||||
<span class="nv">$refreshToken</span> <span class="o">=</span> <span class="s1">'m0APA99Ee7E6jNryVBrZ4qlktsEiwgspKEAotaze'</span><span class="p">;</span>
|
||||
|
||||
<span class="nv">$requestParams</span> <span class="o">=</span> <span class="p">[</span>
|
||||
<span class="s1">'client_id'</span> <span class="o">=></span> <span class="s1">'ely'</span><span class="p">,</span> <span class="c1">// Ваш ClientId, полученный при регистрации</span>
|
||||
<span class="s1">'client_secret'</span> <span class="o">=></span> <span class="s1">'Pk4uCtZw5WVlSUpvteJuTZkVqHXZ6aNtTaLPXa7X'</span><span class="p">,</span> <span class="c1">// Ваш ClientSecret, полученный при регистрации</span>
|
||||
<span class="s1">'scope'</span> <span class="o">=></span> <span class="s1">'account_info account_email'</span><span class="p">,</span>
|
||||
<span class="s1">'refresh_token'</span> <span class="o">=></span> <span class="nv">$refreshToken</span><span class="p">,</span>
|
||||
<span class="s1">'grant_type'</span> <span class="o">=></span> <span class="s1">'refresh_token'</span><span class="p">,</span>
|
||||
<span class="p">];</span>
|
||||
|
||||
<span class="nv">$curl</span> <span class="o">=</span> <span class="nb">curl_init</span><span class="p">();</span>
|
||||
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$curl</span><span class="p">,</span> <span class="nx">CURLOPT_URL</span><span class="p">,</span> <span class="s1">'https://account.ely.by/api/oauth2/v1/token'</span><span class="p">);</span>
|
||||
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$curl</span><span class="p">,</span> <span class="nx">CURLOPT_RETURNTRANSFER</span><span class="p">,</span> <span class="k">true</span><span class="p">);</span>
|
||||
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$curl</span><span class="p">,</span> <span class="nx">CURLOPT_POST</span><span class="p">,</span> <span class="k">true</span><span class="p">);</span>
|
||||
<span class="nb">curl_setopt</span><span class="p">(</span><span class="nv">$curl</span><span class="p">,</span> <span class="nx">CURLOPT_POSTFIELDS</span><span class="p">,</span> <span class="nb">http_build_query</span><span class="p">(</span><span class="nv">$requestParams</span><span class="p">));</span>
|
||||
<span class="nv">$result</span> <span class="o">=</span> <span class="nb">json_decode</span><span class="p">(</span><span class="nb">curl_exec</span><span class="p">(</span><span class="nv">$curl</span><span class="p">),</span> <span class="k">true</span><span class="p">);</span>
|
||||
<span class="nb">curl_close</span><span class="p">(</span><span class="nv">$curl</span><span class="p">);</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>The answer will have exactly the same body as the result of <a class="reference external" href="#authorization-code-grant-response">exchanging auto code for an access token</a>. The <code class="docutils literal notranslate"><span class="pre">refresh_token</span></code> field will be absent.</p>
|
||||
</div>
|
||||
<div class="section" id="id12">
|
||||
<h2>Available libraries<a class="headerlink" href="#id12" title="Permalink to this headline">¶</a></h2>
|
||||
<p>A simpler way is to use a ready-made library, to which you’ll only have to provide registration parameters. Listed below are libraries for various programming languages. You can extend this list by providing your own library.</p>
|
||||
<ul class="simple">
|
||||
<li><p><strong>PHP</strong>:</p>
|
||||
<ul>
|
||||
<li><p>[Official] <a class="reference external" href="https://github.com/elyby/league-oauth2-provider">https://github.com/elyby/league-oauth2-provider</a></p></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><p><strong>Ruby</strong>:</p>
|
||||
<ul>
|
||||
<li><p>[Official] <a class="reference external" href="https://github.com/elyby/omniauth-ely">https://github.com/elyby/omniauth-ely</a></p></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="id13">
|
||||
<h2>Possible errors<a class="headerlink" href="#id13" title="Permalink to this headline">¶</a></h2>
|
||||
<p>Below are the typical errors that you may receive after transmitting incorrect data to the authorization server. If you encounter an error that is not described in this documentation, please report it via <a class="reference external" href="https://ely.by/site/contact">feedback form</a>.</p>
|
||||
<div class="section" id="auth-start-errors">
|
||||
<span id="id15"></span><h3>Errors during authorization initiation<a class="headerlink" href="#auth-start-errors" title="Permalink to this headline">¶</a></h3>
|
||||
<p>This section describes the errors displayed when a user is redirected from your site to our authorization initiation page.</p>
|
||||
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>Invalid request ({parameter} required).
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>This error means that you did not pass all the required parameters. To solve this error just add the missing parameter.</p>
|
||||
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>Invalid response type '{invalid_response_type_value}'.
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>This error indicates that you passed an unsupported type of <code class="docutils literal notranslate"><span class="pre">response_type</span></code>. Currently, the only supported value is <code class="docutils literal notranslate"><span class="pre">code</span></code>.</p>
|
||||
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>Invalid scope '{invalid_scope}'.
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>The error indicates that an unknown scope was requested. Make sure you request <a class="reference external" href="#available-scopes">supported scopes</a>.</p>
|
||||
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>Can not find application you are trying to authorize.
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>This error indicates that the passed parameters do not correspond to any of the registered applications. To solve the problem, fix your <code class="docutils literal notranslate"><span class="pre">client_id</span></code> and <code class="docutils literal notranslate"><span class="pre">redirect_uri</span></code> values.</p>
|
||||
</div>
|
||||
<div class="section" id="issue-token-errors">
|
||||
<span id="id17"></span><h3>Errors when exchanging code for a key<a class="headerlink" href="#issue-token-errors" title="Permalink to this headline">¶</a></h3>
|
||||
<p>If an error occurs, instead of the expected response with the <code class="docutils literal notranslate"><span class="pre">200</span></code> status, you will receive a <code class="docutils literal notranslate"><span class="pre">40x</span></code> code and the following 2 fields:</p>
|
||||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
||||
<span class="nt">"error"</span><span class="p">:</span> <span class="s2">"invalid_request"</span><span class="p">,</span>
|
||||
<span class="nt">"error_description"</span><span class="p">:</span> <span class="s2">"The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed. Check the \"code\" parameter."</span>
|
||||
<span class="p">}</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>The <code class="docutils literal notranslate"><span class="pre">error</span></code> field contains the system error identifier, and <code class="docutils literal notranslate"><span class="pre">error_description</span></code> describes the error in English language.</p>
|
||||
<p><strong>Possible error values:</strong></p>
|
||||
<table class="colwidths-given docutils align-default">
|
||||
<colgroup>
|
||||
<col style="width: 1%">
|
||||
<col style="width: 99%">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">invalid_request</span></code></p></td>
|
||||
<td><p>Not all the required request parameters were passed or the <code class="docutils literal notranslate"><span class="pre">code</span></code> value was not found in the issued codes database.</p></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">unsupported_grant_type</span></code></p></td>
|
||||
<td><p>This error indicates that you tried to authorize using an unknown for our OAuth2 server Grant-type.</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">invalid_client</span></code></p></td>
|
||||
<td><p>This error occurs when the trio of values <code class="docutils literal notranslate"><span class="pre">client_id</span></code>, <code class="docutils literal notranslate"><span class="pre">client_secret</span></code> and <code class="docutils literal notranslate"><span class="pre">redirect_uri</span></code> didn’t match with any of the registered applications.</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="section" id="id18">
|
||||
<h3>Errors when requesting user information<a class="headerlink" href="#id18" title="Permalink to this headline">¶</a></h3>
|
||||
<p>Response status <code class="docutils literal notranslate"><span class="pre">401</span></code> indicates that the <code class="docutils literal notranslate"><span class="pre">Authorization</span></code> header is not present in the request or its value formed incorrectly. The response body will be as follows:</p>
|
||||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
||||
<span class="nt">"name"</span><span class="p">:</span> <span class="s2">"Unauthorized"</span><span class="p">,</span>
|
||||
<span class="nt">"status"</span><span class="p">:</span> <span class="mi">401</span><span class="p">,</span>
|
||||
<span class="nt">"message"</span><span class="p">:</span> <span class="s2">"Your request was made with invalid credentials."</span>
|
||||
<span class="p">}</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>A response with the <code class="docutils literal notranslate"><span class="pre">403</span></code> status indicates that the token transferred in the <code class="docutils literal notranslate"><span class="pre">Authorization</span></code> header does not contain the <code class="docutils literal notranslate"><span class="pre">account_info</span></code> scope or it has expired. The response will be in the following format:</p>
|
||||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
||||
<span class="nt">"name"</span><span class="p">:</span> <span class="s2">"Forbidden"</span><span class="p">,</span>
|
||||
<span class="nt">"status"</span><span class="p">:</span> <span class="mi">403</span><span class="p">,</span>
|
||||
<span class="nt">"message"</span><span class="p">:</span> <span class="s2">"You are not allowed to perform this action."</span>
|
||||
<span class="p">}</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="id19">
|
||||
<h3>Errors while updating access token<a class="headerlink" href="#id19" title="Permalink to this headline">¶</a></h3>
|
||||
<p>When updating the access token you may encounter the same errors from <a class="reference external" href="#issue-token-errors">exchanging auth code for an access token</a>, as well as several new ones:</p>
|
||||
<table class="colwidths-given docutils align-default">
|
||||
<colgroup>
|
||||
<col style="width: 1%">
|
||||
<col style="width: 99%">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">invalid_request</span></code></p></td>
|
||||
<td><p>Not all the required request parameters were passed or the <code class="docutils literal notranslate"><span class="pre">refresh_token</span></code> value wasn’t found in the issued tokens database.</p></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">invalid_scope</span></code></p></td>
|
||||
<td><p>The unsupported scope was listed or requested more scopes than the original token had.</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<footer>
|
||||
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
|
||||
<a href="/en/skins-system.html" class="btn btn-neutral float-right" title="Skins system" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
|
||||
<a href="/en/minecraft-auth.html" class="btn btn-neutral float-left" title="Authentication for Minecraft" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
© Copyright 2024, Ely.by.
|
||||
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
|
||||
|
||||
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
|
||||
|
||||
provided by <a href="https://readthedocs.org">Read the Docs</a>.
|
||||
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function () {
|
||||
SphinxRtdTheme.Navigation.enable(true);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-45299905-2"></script>
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
gtag('js', new Date());
|
||||
|
||||
gtag('config', 'UA-45299905-2');
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
258
en/search.html
Normal file
258
en/search.html
Normal file
@@ -0,0 +1,258 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Search — Ely.by Docs</title>
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="/_static/css/theme.css" type="text/css">
|
||||
<link rel="stylesheet" href="/_static/pygments.css" type="text/css">
|
||||
<link rel="stylesheet" href="/_static/style.css" type="text/css">
|
||||
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="/_static/favicon.ico">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="_static/js/html5shiv.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
<script type="text/javascript" id="documentation_options" data-url_root="./" src="/en/_static/documentation_options.js"></script>
|
||||
<script src="/_static/jquery.js"></script>
|
||||
<script src="/_static/underscore.js"></script>
|
||||
<script src="/_static/doctools.js"></script>
|
||||
|
||||
<script type="text/javascript" src="/_static/js/theme.js"></script>
|
||||
|
||||
|
||||
<script type="text/javascript" src="/_static/searchtools.js"></script>
|
||||
<script type="text/javascript" src="/en/_static/language_data.js"></script>
|
||||
<link rel="index" title="Index" href="/en/genindex.html">
|
||||
<link rel="search" title="Search" href="#">
|
||||
</head>
|
||||
|
||||
<body class="wy-body-for-nav">
|
||||
|
||||
|
||||
<div class="wy-grid-for-nav">
|
||||
|
||||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||||
<div class="wy-side-scroll">
|
||||
<div class="wy-side-nav-search">
|
||||
|
||||
|
||||
|
||||
<a href="/en/index.html" class="icon icon-home"> Ely.by Documentation
|
||||
|
||||
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div role="search">
|
||||
<form id="rtd-search-form" class="wy-form" action="#" method="get">
|
||||
<input type="text" name="q" placeholder="Search docs">
|
||||
<input type="hidden" name="check_keywords" value="yes">
|
||||
<input type="hidden" name="area" value="default">
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="caption"><span class="caption-text">English articles:</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/en/api.html">Ely.by API (Mojang API simulation)</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/en/authlib-injector.html">Authlib-injector</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/en/minecraft-auth.html">Authentication for Minecraft</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/en/oauth.html">Authorization via OAuth2 protocol</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/en/skins-system.html">Skins system</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="caption"><span class="caption-text">Статьи на русском:</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/ru/api.html">Ely.by API (симуляция Mojang API)</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/ru/authlib-injector.html">Authlib-injector</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/ru/minecraft-auth.html">Авторизация для Minecraft</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/ru/oauth.html">Авторизация по протоколу OAuth2</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/ru/skins-system.html">Система скинов</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||
|
||||
|
||||
<nav class="wy-nav-top" aria-label="top navigation">
|
||||
|
||||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||
<a href="/en/index.html">Ely.by Documentation</a>
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
<div class="wy-nav-content">
|
||||
|
||||
<div class="rst-content">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div role="navigation" aria-label="breadcrumbs navigation">
|
||||
|
||||
<ul class="wy-breadcrumbs">
|
||||
|
||||
<li><a href="/en/index.html" class="icon icon-home"></a> »</li>
|
||||
|
||||
<li>Search</li>
|
||||
|
||||
|
||||
<li class="wy-breadcrumbs-aside">
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<hr>
|
||||
</div>
|
||||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||||
<div itemprop="articleBody">
|
||||
|
||||
<noscript>
|
||||
<div id="fallback" class="admonition warning">
|
||||
<p class="last">
|
||||
Please activate JavaScript to enable the search functionality.
|
||||
</p>
|
||||
</div>
|
||||
</noscript>
|
||||
|
||||
|
||||
<div id="search-results">
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<footer>
|
||||
|
||||
<hr>
|
||||
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
© Copyright 2024, Ely.by.
|
||||
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
|
||||
|
||||
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
|
||||
|
||||
provided by <a href="https://readthedocs.org">Read the Docs</a>.
|
||||
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function () {
|
||||
SphinxRtdTheme.Navigation.enable(true);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function() { Search.loadIndex("searchindex.js"); });
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" id="searchindexloader"></script>
|
||||
|
||||
|
||||
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-45299905-2"></script>
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
gtag('js', new Date());
|
||||
|
||||
gtag('config', 'UA-45299905-2');
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
1
en/searchindex.js
Normal file
1
en/searchindex.js
Normal file
File diff suppressed because one or more lines are too long
421
en/skins-system.html
Normal file
421
en/skins-system.html
Normal file
@@ -0,0 +1,421 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Skins system — Ely.by Docs</title>
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="/_static/css/theme.css" type="text/css">
|
||||
<link rel="stylesheet" href="/_static/pygments.css" type="text/css">
|
||||
<link rel="stylesheet" href="/_static/style.css" type="text/css">
|
||||
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="/_static/favicon.ico">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="_static/js/html5shiv.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
<script type="text/javascript" id="documentation_options" data-url_root="./" src="/en/_static/documentation_options.js"></script>
|
||||
<script src="/_static/jquery.js"></script>
|
||||
<script src="/_static/underscore.js"></script>
|
||||
<script src="/_static/doctools.js"></script>
|
||||
|
||||
<script type="text/javascript" src="/_static/js/theme.js"></script>
|
||||
|
||||
|
||||
<link rel="index" title="Index" href="/en/genindex.html">
|
||||
<link rel="search" title="Search" href="/en/search.html">
|
||||
<link rel="prev" title="Authorization via OAuth2 protocol" href="/en/oauth.html">
|
||||
</head>
|
||||
|
||||
<body class="wy-body-for-nav">
|
||||
|
||||
|
||||
<div class="wy-grid-for-nav">
|
||||
|
||||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||||
<div class="wy-side-scroll">
|
||||
<div class="wy-side-nav-search">
|
||||
|
||||
|
||||
|
||||
<a href="/en/index.html" class="icon icon-home"> Ely.by Documentation
|
||||
|
||||
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div role="search">
|
||||
<form id="rtd-search-form" class="wy-form" action="/en/search.html" method="get">
|
||||
<input type="text" name="q" placeholder="Search docs">
|
||||
<input type="hidden" name="check_keywords" value="yes">
|
||||
<input type="hidden" name="area" value="default">
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="caption"><span class="caption-text">English articles:</span></p>
|
||||
<ul class="current">
|
||||
<li class="toctree-l1"><a class="reference internal" href="/en/api.html">Ely.by API (Mojang API simulation)</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/en/authlib-injector.html">Authlib-injector</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/en/minecraft-auth.html">Authentication for Minecraft</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/en/oauth.html">Authorization via OAuth2 protocol</a></li>
|
||||
<li class="toctree-l1 current"><a class="current reference internal" href="#">Skins system</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#url">Requests URLs</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#id6">Additional URLs</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#textures-proxy">Textures proxying</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#id13">Ready-made implementations</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="caption"><span class="caption-text">Статьи на русском:</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/ru/api.html">Ely.by API (симуляция Mojang API)</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/ru/authlib-injector.html">Authlib-injector</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/ru/minecraft-auth.html">Авторизация для Minecraft</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/ru/oauth.html">Авторизация по протоколу OAuth2</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/ru/skins-system.html">Система скинов</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||
|
||||
|
||||
<nav class="wy-nav-top" aria-label="top navigation">
|
||||
|
||||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||
<a href="/en/index.html">Ely.by Documentation</a>
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
<div class="wy-nav-content">
|
||||
|
||||
<div class="rst-content">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div role="navigation" aria-label="breadcrumbs navigation">
|
||||
|
||||
<ul class="wy-breadcrumbs">
|
||||
|
||||
<li><a href="/en/index.html" class="icon icon-home"></a> »</li>
|
||||
|
||||
<li>Skins system</li>
|
||||
|
||||
|
||||
<li class="wy-breadcrumbs-aside">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<hr>
|
||||
</div>
|
||||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||||
<div itemprop="articleBody">
|
||||
|
||||
<div class="section" id="id1">
|
||||
<h1>Skins system<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h1>
|
||||
<p>On this page you’ll find information about available endpoints of Ely.by’s skins system service. You can use any of them as an secondary or primary source of skins for your project.</p>
|
||||
<p>Ely.by’s skins system service provides <a class="reference external" href="#textures-proxy">proxying of textures from Minecraft premium users</a>, which means that using this service, your players will see both premium Minecraft users’ skins and Ely.by users’ skins.</p>
|
||||
<p>We strive to comply with the official skins system and do not support ears and HD-skins. The system supports capes, but doesn’t allow players to wear them on their own.</p>
|
||||
<p>If you have suggestions for improving the existing functionality, please <a class="reference external" href="https://github.com/elyby/chrly/issues/new">create a new Issue</a> at the <a class="reference external" href="https://github.com/elyby/chrly">Chrly project repository</a>.</p>
|
||||
<div class="admonition note">
|
||||
<p class="admonition-title">Note</p>
|
||||
<p>You can find more detailed information about the implementation of the skins system server in the <a class="reference external" href="https://github.com/elyby/chrly">Chrly project repository</a>.</p>
|
||||
</div>
|
||||
<div class="section" id="url">
|
||||
<h2>Requests URLs<a class="headerlink" href="#url" title="Permalink to this headline">¶</a></h2>
|
||||
<p>The skins system is located at the <cite>http://skinsystem.ely.by</cite> domain.</p>
|
||||
<p>In all queries, the <code class="docutils literal notranslate"><span class="pre">nickname</span></code> param must be replaced by the player’s name. The value is case-insensitive.</p>
|
||||
<span class="target" id="skin-request"></span><dl class="py function">
|
||||
<dt>
|
||||
<code class="sig-name descname"><span class="pre">/skins/{nickname}.png</span></code></dt>
|
||||
<dd><p>URL for downloading a skin texture. The <code class="docutils literal notranslate"><span class="pre">.png</span></code> extension can be omitted. If textures aren’t found, the server will return a <code class="docutils literal notranslate"><span class="pre">404</span></code> status response.</p>
|
||||
</dd></dl>
|
||||
|
||||
<span class="target" id="cape-request"></span><dl class="py function">
|
||||
<dt>
|
||||
<code class="sig-name descname"><span class="pre">/cloaks/{nickname}.png</span></code></dt>
|
||||
<dd><p>URL for downloading a cape texture. The <code class="docutils literal notranslate"><span class="pre">.png</span></code> extension can be omitted. If textures aren’t found, the server will return a <code class="docutils literal notranslate"><span class="pre">404</span></code> status response.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt>
|
||||
<code class="sig-name descname"><span class="pre">/textures/{nickname}</span></code></dt>
|
||||
<dd><p>Via this URL you can get textures in the format specified in the <code class="docutils literal notranslate"><span class="pre">textures</span></code> field of JSON property with the same name in response to a <a class="reference external" href="https://wiki.vg/Mojang_API#UUID_-.3E_Profile_.2B_Skin.2FCape">request for signed textures</a>:</p>
|
||||
<div class="highlight-javascript notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
||||
<span class="s2">"SKIN"</span><span class="o">:</span> <span class="p">{</span>
|
||||
<span class="s2">"url"</span><span class="o">:</span> <span class="s2">"http://example.com/skin.png"</span><span class="p">,</span>
|
||||
<span class="s2">"metadata"</span><span class="o">:</span> <span class="p">{</span>
|
||||
<span class="s2">"model"</span><span class="o">:</span> <span class="s2">"slim"</span>
|
||||
<span class="p">}</span>
|
||||
<span class="p">},</span>
|
||||
<span class="s2">"CAPE"</span><span class="o">:</span> <span class="p">{</span>
|
||||
<span class="s2">"url"</span><span class="o">:</span> <span class="s2">"http://example.com/cape.png"</span>
|
||||
<span class="p">}</span>
|
||||
<span class="p">}</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Depending on the availability of textures for the player, fields <code class="docutils literal notranslate"><span class="pre">SKIN</span></code> or <code class="docutils literal notranslate"><span class="pre">CAPE</span></code> may be absent. Unless the skin model is <code class="docutils literal notranslate"><span class="pre">slim</span></code>, the <code class="docutils literal notranslate"><span class="pre">metadata</span></code> field will be omitted.</p>
|
||||
<p>The server will return an empty response with <code class="docutils literal notranslate"><span class="pre">204</span></code> status, if textures aren’t found.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt>
|
||||
<code class="sig-name descname"><span class="pre">/profile/{nickname}</span></code></dt>
|
||||
<dd><p>This endpoint is an analog of the <a class="reference external" href="https://wiki.vg/Mojang_API#UUID_-.3E_Profile_.2B_Skin.2FCape">player profile query in the Mojang’s API</a>, but instead of UUID user is queried by his nickname. Just like in the Mojang’s API, you can append <code class="docutils literal notranslate"><span class="pre">?unsigned=false</span></code> to the URL to get textures with a signature. The response will also include an additional property with <code class="docutils literal notranslate"><span class="pre">name</span></code> <strong>ely</strong>.</p>
|
||||
<p>If the user has no textures, they’ll be requested through the Mojang’s API, but the Mojang’s signature will be discarded and textures will be re-signed using <a class="reference external" href="#signature-verification-key-request">our signature key</a>.</p>
|
||||
<div class="highlight-javascript notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
||||
<span class="s2">"id"</span><span class="o">:</span> <span class="s2">"ffc8fdc95824509e8a57c99b940fb996"</span><span class="p">,</span>
|
||||
<span class="s2">"name"</span><span class="o">:</span> <span class="s2">"ErickSkrauch"</span><span class="p">,</span>
|
||||
<span class="s2">"properties"</span><span class="o">:</span> <span class="p">[</span>
|
||||
<span class="p">{</span>
|
||||
<span class="s2">"name"</span><span class="o">:</span> <span class="s2">"textures"</span><span class="p">,</span>
|
||||
<span class="s2">"signature"</span><span class="o">:</span> <span class="s2">"eks3dLJWzod92dLfWH6Z8uc6l3+IvrZtTj3zjwnj0AdVt44ODKoL50N+RabYxf7zF3C7tlJwT1oAtydONrxXUarqUlpVeQzLlfsuqUKBLi0L+/Y9yQLG3AciNqzEWq3hYaOsJrsaJday/hQmKFnpXEFCThTMpSuZhoAZIiH4VG48NhP70U93ejyXF9b1nPYnXP6k7BVB8LYSzcjZfdqY88jQJbbvRzOyX14ZSD0Ma92jceLNKmkTVc2UfRLUNXtQKtVSFUzlAjCXPJW89IIOZTRqLg65qstWwBvn6VuikyUB5EIxM8vuCh7zTkrMOx1v2Q0xIj8YSFcbnBH2bo87SYOIe1bOK57ZEeUJqY6uSgMlWs7dI5D3nmhFptErm72hg55Axdo1xbG4mvnmLYF7SA4yMDSytPPL+kA+sw3pafnvU2IZo38gqJSDOOpkOpdhUoHx85fzRJL8AcLSJiFlCZDl4pSi3cVuKy/xY5ohT/fJ6GEqpbZp3gACymn47zzI42VSh6j1DQnx2wnhqalTv0kE3qpAFpK/htSboQkFCW/bULO3b+vgU87XPlReT7UtH4yGLtixgs5GC8AzBraN8vOMv8TZCX9ab6mBBjOoDJjXa8Tq637TC75GxRHlpAN2jRHYvyp2zJwjUrML3u4eD4osHW+VBfl8D2l3nLJuemQ="</span><span class="p">,</span>
|
||||
<span class="s2">"value"</span><span class="o">:</span> <span class="s2">"eyJ0aW1lc3RhbXAiOjE2MTQ5MzczMjc0MzcsInByb2ZpbGVJZCI6ImZmYzhmZGM5NTgyNDUwOWU4YTU3Yzk5Yjk0MGZiOTk2IiwicHJvZmlsZU5hbWUiOiJFcmlja1NrcmF1Y2giLCJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly9lbHkuYnkvc3RvcmFnZS9za2lucy82OWM2NzQwZDI5OTNlNWQ2ZjZhN2ZjOTI0MjBlZmMyOS5wbmcifX19"</span>
|
||||
<span class="p">},</span>
|
||||
<span class="p">{</span>
|
||||
<span class="s2">"name"</span><span class="o">:</span> <span class="s2">"ely"</span><span class="p">,</span>
|
||||
<span class="s2">"value"</span><span class="o">:</span> <span class="s2">"but why are you asking?"</span>
|
||||
<span class="p">}</span>
|
||||
<span class="p">]</span>
|
||||
<span class="p">}</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>The server will return an empty response with <code class="docutils literal notranslate"><span class="pre">204</span></code> status if the nickname wasn’t found locally nor via the Mojang’s API.</p>
|
||||
</dd></dl>
|
||||
|
||||
<span class="target" id="signature-verification-key-request"></span><dl class="py function">
|
||||
<dt>
|
||||
<code class="sig-name descname"><span class="pre">/signature-verification-key.der</span></code></dt>
|
||||
<dd><p>This endpoint returns a public key that can be used to verify a texture’s signature. The key is provided in <code class="docutils literal notranslate"><span class="pre">DER</span></code> format, so it can be used directly in the Authlib, without modifying the signature checking algorithm.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt>
|
||||
<code class="sig-name descname"><span class="pre">/signature-verification-key.pem</span></code></dt>
|
||||
<dd><p>The same endpoint as the previous one, except that it returns the key in <code class="docutils literal notranslate"><span class="pre">PEM</span></code> format.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt>
|
||||
<code class="sig-name descname"><span class="pre">/textures/signed/{nickname}</span></code></dt>
|
||||
<dd><p>This request is used in our <a class="reference external" href="https://ely.by/server-skins-system">server skins system plugin</a> to load textures with the original Mojang’s signature. The textures received this way can be transferred to an unmodified game client without any changes. The answer will also include additional property with <code class="docutils literal notranslate"><span class="pre">name</span></code> equal to <strong>ely</strong>.</p>
|
||||
<div class="highlight-javascript notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
||||
<span class="s2">"id"</span><span class="o">:</span> <span class="s2">"ffc8fdc95824509e8a57c99b940fb996"</span><span class="p">,</span>
|
||||
<span class="s2">"name"</span><span class="o">:</span> <span class="s2">"ErickSkrauch"</span><span class="p">,</span>
|
||||
<span class="s2">"properties"</span><span class="o">:</span> <span class="p">[</span>
|
||||
<span class="p">{</span>
|
||||
<span class="s2">"name"</span><span class="o">:</span> <span class="s2">"textures"</span><span class="p">,</span>
|
||||
<span class="s2">"signature"</span><span class="o">:</span> <span class="s2">"QH+1rlQJYk8tW+8WlSJnzxZZUL5RIkeOO33dq84cgNoxwCkzL95Zy5pbPMFhoiMXXablqXeqyNRZDQa+OewgDBSZxm0BmkNmwdTLzCPHgnlNYhwbO4sirg3hKjCZ82ORZ2q7VP2NQIwNvc3befiCakhDlMWUuhjxe7p/HKNtmKA7a/JjzmzwW7BWMv8b88ZaQaMaAc7puFQcu2E54G2Zk2kyv3T1Bm7bV4m7ymbL8McOmQc6Ph7C95/EyqIK1a5gRBUHPEFIEj0I06YKTHsCRFU1U/hJpk98xXHzHuULJobpajqYXuVJ8QEVgF8k8dn9VkS8BMbXcjzfbb6JJ36v7YIV6Rlt75wwTk2wr3C3P0ij55y0iXth1HjwcEKsg54n83d9w8yQbkUCiTpMbOqxTEOOS7G2O0ZDBJDXAKQ4n5qCiCXKZ4febv4+dWVQtgfZHnpGJUD3KdduDKslMePnECOXMjGSAOQou//yze2EkL2rBpJtAAiOtvBlm/aWnDZpij5cQk+pWmeHWZIf0LSSlsYRUWRDk/VKBvUTEAO9fqOxWqmSgQRUY2Ea56u0ZsBb4vEa1UY6mlJj3+PNZaWu5aP2E9Unh0DIawV96eW8eFQgenlNXHMmXd4aOra4sz2eeOnY53JnJP+eVE4cB1hlq8RA2mnwTtcy3lahzZonOWc="</span><span class="p">,</span>
|
||||
<span class="s2">"value"</span><span class="o">:</span> <span class="s2">"eyJ0aW1lc3RhbXAiOjE0ODYzMzcyNTQ4NzIsInByb2ZpbGVJZCI6ImM0ZjFlNTZmNjFkMTQwYTc4YzMyOGQ5MTY2ZWVmOWU3IiwicHJvZmlsZU5hbWUiOiJXaHlZb3VSZWFkVGhpcyIsInRleHR1cmVzIjp7IlNLSU4iOnsidXJsIjoiaHR0cDovL3RleHR1cmVzLm1pbmVjcmFmdC5uZXQvdGV4dHVyZS83Mzk1NmE4ZTY0ZWU2ZDhlYzY1NmFkYmI0NDA0ZjhlYmZmMzQxMWIwY2I5MGIzMWNiNDc2ZWNiOTk2ZDNiOCJ9fX0="</span>
|
||||
<span class="p">},</span>
|
||||
<span class="p">{</span>
|
||||
<span class="s2">"name"</span><span class="o">:</span> <span class="s2">"ely"</span><span class="p">,</span>
|
||||
<span class="s2">"value"</span><span class="o">:</span> <span class="s2">"but why are you asking?"</span>
|
||||
<span class="p">}</span>
|
||||
<span class="p">]</span>
|
||||
<span class="p">}</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>By default textures proxying isn’t used for this query. To enable it, add an additional GET parameter <code class="docutils literal notranslate"><span class="pre">?proxy=true</span></code>.</p>
|
||||
<p>The server will return an empty response with <code class="docutils literal notranslate"><span class="pre">204</span></code> status, if textures aren’t found.</p>
|
||||
</dd></dl>
|
||||
|
||||
<hr class="docutils">
|
||||
<p>You can also pass a range of additional GET parameters while making any of the above requests. They will be used
|
||||
to analyze the usage of the service by different versions of the game.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">version</dt>
|
||||
<dd class="field-odd"><p>The version of the protocol by which skins will be requested. The current version is <code class="docutils literal notranslate"><span class="pre">2</span></code>, i.e. you need to specify <code class="docutils literal notranslate"><span class="pre">version=2</span></code>.</p>
|
||||
</dd>
|
||||
<dt class="field-even">minecraft_version</dt>
|
||||
<dd class="field-even"><p>The version of Minecraft that the request is made from.</p>
|
||||
</dd>
|
||||
<dt class="field-odd">authlib_version</dt>
|
||||
<dd class="field-odd"><p>The version of the Authlib used. This option is relevant for Minecraft versions 1.7.6+, where a separate library is used to load skins instead of in-game code.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<p>Here is an example of a textures request with parameters described above:</p>
|
||||
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>http://skinsystem.ely.by/textures/erickskrauch?version=2&minecraft_version=1.14.0&authlib_version=1.5.25
|
||||
</pre></div>
|
||||
</div>
|
||||
<div class="section" id="id6">
|
||||
<h3>Additional URLs<a class="headerlink" href="#id6" title="Permalink to this headline">¶</a></h3>
|
||||
<p>You can also perform a skin and cape request by passing the nickname through the GET parameter. This feature is used to pass analytical parameters of game versions up to 1.5.2, where the nickname is simply appended to the end of the line. To do this, the entire string is arranged in such a way that the last parameter is <code class="docutils literal notranslate"><span class="pre">name</span></code>, after appending a nickname to which you get a full request string for textures.</p>
|
||||
<dl class="py function">
|
||||
<dt>
|
||||
<code class="sig-name descname"><span class="pre">/skins?name={nickname}.png</span></code></dt>
|
||||
<dd><p>See the <a class="reference external" href="#skin-request">skin request</a>.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt>
|
||||
<code class="sig-name descname"><span class="pre">/cloaks?name={nickname}.png</span></code></dt>
|
||||
<dd><p>See the <a class="reference external" href="#cape-request">cape request</a>.</p>
|
||||
</dd></dl>
|
||||
|
||||
<p>Examples of requests for textures with parameters from above:</p>
|
||||
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>http://skinsystem.ely.by/skins?version=2&minecraft_version=1.5.2&name=erickskrauch.png
|
||||
http://skinsystem.ely.by/cloaks?version=2&minecraft_version=1.4.7&name=notch
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="textures-proxy">
|
||||
<span id="id9"></span><h2>Textures proxying<a class="headerlink" href="#textures-proxy" title="Permalink to this headline">¶</a></h2>
|
||||
<p>Ely.by’s skins system service obtains textures from the official skin system in a case where no information about textures for the requested username was found in the database. The request will also be proxied if a skin entry is found, but it’s default.</p>
|
||||
<p>To improve the throughput of the proxying algorithm, information about textures is cached in 2 stages:</p>
|
||||
<ul class="simple">
|
||||
<li><p>Player’s names and UUIDs matches are stored <a class="reference external" href="https://help.minecraft.net/hc/en-us/articles/360034636712-Minecraft-Usernames#article-container:~:text=How%20often%20can%20I%20change%20my%20username%3F">for 30 days</a>.</p></li>
|
||||
<li><p>Information about textures isn’t updated more often than <a class="reference external" href="https://wiki.vg/Mojang_API#UUID_-.3E_Profile_.2B_Skin.2FCape:~:text=You%20can%20request%20the%20same%20profile%20once%20per%20minute">once a minute</a>.</p></li>
|
||||
</ul>
|
||||
<p>If you own a Minecraft premium account, but your nickname is busy, please contact our <a class="reference external" href="https://ely.by/site/contact">support team</a> and after a short check we’ll pass the nickname on to you.</p>
|
||||
</div>
|
||||
<div class="section" id="id13">
|
||||
<h2>Ready-made implementations<a class="headerlink" href="#id13" title="Permalink to this headline">¶</a></h2>
|
||||
<p>Ready-made patch implementations and installation instructions can be found at the <a class="reference external" href="https://ely.by/load">download section of the main Ely.by website</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<footer>
|
||||
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
|
||||
<a href="/en/oauth.html" class="btn btn-neutral float-left" title="Authorization via OAuth2 protocol" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
© Copyright 2024, Ely.by.
|
||||
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
|
||||
|
||||
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
|
||||
|
||||
provided by <a href="https://readthedocs.org">Read the Docs</a>.
|
||||
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function () {
|
||||
SphinxRtdTheme.Navigation.enable(true);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-45299905-2"></script>
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
gtag('js', new Date());
|
||||
|
||||
gtag('config', 'UA-45299905-2');
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user