Deploying to gh-pages from @ elyby/docs@bb30974d09 🚀
BIN
_downloads/176af30a246da419bd7cc8f9571f5c60/authlib-1.3.jar
Normal file
BIN
_downloads/ef940186495aa507c548b1a0a96c2867/authlib-1.3.1.jar
Normal file
BIN
_images/authlib-install.png
Normal file
After Width: | Height: | Size: 43 KiB |
BIN
_images/bungeecord_inclasstranslator.png
Normal file
After Width: | Height: | Size: 26 KiB |
BIN
_images/bungeecord_move.png
Normal file
After Width: | Height: | Size: 79 KiB |
BIN
_images/installing_by_inclasstranslator.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
_images/launcher-jvm-options.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
_images/server-startup-messages.png
Normal file
After Width: | Height: | Size: 65 KiB |
856
_static/basic.css
Normal file
@ -0,0 +1,856 @@
|
||||
/*
|
||||
* basic.css
|
||||
* ~~~~~~~~~
|
||||
*
|
||||
* Sphinx stylesheet -- basic theme.
|
||||
*
|
||||
* :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
|
||||
* :license: BSD, see LICENSE for details.
|
||||
*
|
||||
*/
|
||||
|
||||
/* -- main layout ----------------------------------------------------------- */
|
||||
|
||||
div.clearer {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
div.section::after {
|
||||
display: block;
|
||||
content: '';
|
||||
clear: left;
|
||||
}
|
||||
|
||||
/* -- relbar ---------------------------------------------------------------- */
|
||||
|
||||
div.related {
|
||||
width: 100%;
|
||||
font-size: 90%;
|
||||
}
|
||||
|
||||
div.related h3 {
|
||||
display: none;
|
||||
}
|
||||
|
||||
div.related ul {
|
||||
margin: 0;
|
||||
padding: 0 0 0 10px;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
div.related li {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
div.related li.right {
|
||||
float: right;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
/* -- sidebar --------------------------------------------------------------- */
|
||||
|
||||
div.sphinxsidebarwrapper {
|
||||
padding: 10px 5px 0 10px;
|
||||
}
|
||||
|
||||
div.sphinxsidebar {
|
||||
float: left;
|
||||
width: 230px;
|
||||
margin-left: -100%;
|
||||
font-size: 90%;
|
||||
word-wrap: break-word;
|
||||
overflow-wrap : break-word;
|
||||
}
|
||||
|
||||
div.sphinxsidebar ul {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
div.sphinxsidebar ul ul,
|
||||
div.sphinxsidebar ul.want-points {
|
||||
margin-left: 20px;
|
||||
list-style: square;
|
||||
}
|
||||
|
||||
div.sphinxsidebar ul ul {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
div.sphinxsidebar form {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
div.sphinxsidebar input {
|
||||
border: 1px solid #98dbcc;
|
||||
font-family: sans-serif;
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
div.sphinxsidebar #searchbox form.search {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
div.sphinxsidebar #searchbox input[type="text"] {
|
||||
float: left;
|
||||
width: 80%;
|
||||
padding: 0.25em;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
div.sphinxsidebar #searchbox input[type="submit"] {
|
||||
float: left;
|
||||
width: 20%;
|
||||
border-left: none;
|
||||
padding: 0.25em;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
|
||||
img {
|
||||
border: 0;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
/* -- search page ----------------------------------------------------------- */
|
||||
|
||||
ul.search {
|
||||
margin: 10px 0 0 20px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
ul.search li {
|
||||
padding: 5px 0 5px 20px;
|
||||
background-image: url(file.png);
|
||||
background-repeat: no-repeat;
|
||||
background-position: 0 7px;
|
||||
}
|
||||
|
||||
ul.search li a {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
ul.search li div.context {
|
||||
color: #888;
|
||||
margin: 2px 0 0 30px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
ul.keywordmatches li.goodmatch a {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* -- index page ------------------------------------------------------------ */
|
||||
|
||||
table.contentstable {
|
||||
width: 90%;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
table.contentstable p.biglink {
|
||||
line-height: 150%;
|
||||
}
|
||||
|
||||
a.biglink {
|
||||
font-size: 1.3em;
|
||||
}
|
||||
|
||||
span.linkdescr {
|
||||
font-style: italic;
|
||||
padding-top: 5px;
|
||||
font-size: 90%;
|
||||
}
|
||||
|
||||
/* -- general index --------------------------------------------------------- */
|
||||
|
||||
table.indextable {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
table.indextable td {
|
||||
text-align: left;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
table.indextable ul {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
table.indextable > tbody > tr > td > ul {
|
||||
padding-left: 0em;
|
||||
}
|
||||
|
||||
table.indextable tr.pcap {
|
||||
height: 10px;
|
||||
}
|
||||
|
||||
table.indextable tr.cap {
|
||||
margin-top: 10px;
|
||||
background-color: #f2f2f2;
|
||||
}
|
||||
|
||||
img.toggler {
|
||||
margin-right: 3px;
|
||||
margin-top: 3px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
div.modindex-jumpbox {
|
||||
border-top: 1px solid #ddd;
|
||||
border-bottom: 1px solid #ddd;
|
||||
margin: 1em 0 1em 0;
|
||||
padding: 0.4em;
|
||||
}
|
||||
|
||||
div.genindex-jumpbox {
|
||||
border-top: 1px solid #ddd;
|
||||
border-bottom: 1px solid #ddd;
|
||||
margin: 1em 0 1em 0;
|
||||
padding: 0.4em;
|
||||
}
|
||||
|
||||
/* -- domain module index --------------------------------------------------- */
|
||||
|
||||
table.modindextable td {
|
||||
padding: 2px;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
/* -- general body styles --------------------------------------------------- */
|
||||
|
||||
div.body {
|
||||
min-width: 450px;
|
||||
max-width: 800px;
|
||||
}
|
||||
|
||||
div.body p, div.body dd, div.body li, div.body blockquote {
|
||||
-moz-hyphens: auto;
|
||||
-ms-hyphens: auto;
|
||||
-webkit-hyphens: auto;
|
||||
hyphens: auto;
|
||||
}
|
||||
|
||||
a.headerlink {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
a.brackets:before,
|
||||
span.brackets > a:before{
|
||||
content: "[";
|
||||
}
|
||||
|
||||
a.brackets:after,
|
||||
span.brackets > a:after {
|
||||
content: "]";
|
||||
}
|
||||
|
||||
h1:hover > a.headerlink,
|
||||
h2:hover > a.headerlink,
|
||||
h3:hover > a.headerlink,
|
||||
h4:hover > a.headerlink,
|
||||
h5:hover > a.headerlink,
|
||||
h6:hover > a.headerlink,
|
||||
dt:hover > a.headerlink,
|
||||
caption:hover > a.headerlink,
|
||||
p.caption:hover > a.headerlink,
|
||||
div.code-block-caption:hover > a.headerlink {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
div.body p.caption {
|
||||
text-align: inherit;
|
||||
}
|
||||
|
||||
div.body td {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.first {
|
||||
margin-top: 0 !important;
|
||||
}
|
||||
|
||||
p.rubric {
|
||||
margin-top: 30px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
img.align-left, .figure.align-left, object.align-left {
|
||||
clear: left;
|
||||
float: left;
|
||||
margin-right: 1em;
|
||||
}
|
||||
|
||||
img.align-right, .figure.align-right, object.align-right {
|
||||
clear: right;
|
||||
float: right;
|
||||
margin-left: 1em;
|
||||
}
|
||||
|
||||
img.align-center, .figure.align-center, object.align-center {
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
img.align-default, .figure.align-default {
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.align-left {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.align-center {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.align-default {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.align-right {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
/* -- sidebars -------------------------------------------------------------- */
|
||||
|
||||
div.sidebar {
|
||||
margin: 0 0 0.5em 1em;
|
||||
border: 1px solid #ddb;
|
||||
padding: 7px;
|
||||
background-color: #ffe;
|
||||
width: 40%;
|
||||
float: right;
|
||||
clear: right;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
p.sidebar-title {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
div.admonition, div.topic, blockquote {
|
||||
clear: left;
|
||||
}
|
||||
|
||||
/* -- topics ---------------------------------------------------------------- */
|
||||
|
||||
div.topic {
|
||||
border: 1px solid #ccc;
|
||||
padding: 7px;
|
||||
margin: 10px 0 10px 0;
|
||||
}
|
||||
|
||||
p.topic-title {
|
||||
font-size: 1.1em;
|
||||
font-weight: bold;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
/* -- admonitions ----------------------------------------------------------- */
|
||||
|
||||
div.admonition {
|
||||
margin-top: 10px;
|
||||
margin-bottom: 10px;
|
||||
padding: 7px;
|
||||
}
|
||||
|
||||
div.admonition dt {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
p.admonition-title {
|
||||
margin: 0px 10px 5px 0px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
div.body p.centered {
|
||||
text-align: center;
|
||||
margin-top: 25px;
|
||||
}
|
||||
|
||||
/* -- content of sidebars/topics/admonitions -------------------------------- */
|
||||
|
||||
div.sidebar > :last-child,
|
||||
div.topic > :last-child,
|
||||
div.admonition > :last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
div.sidebar::after,
|
||||
div.topic::after,
|
||||
div.admonition::after,
|
||||
blockquote::after {
|
||||
display: block;
|
||||
content: '';
|
||||
clear: both;
|
||||
}
|
||||
|
||||
/* -- tables ---------------------------------------------------------------- */
|
||||
|
||||
table.docutils {
|
||||
margin-top: 10px;
|
||||
margin-bottom: 10px;
|
||||
border: 0;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
table.align-center {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
table.align-default {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
table caption span.caption-number {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
table caption span.caption-text {
|
||||
}
|
||||
|
||||
table.docutils td, table.docutils th {
|
||||
padding: 1px 8px 1px 5px;
|
||||
border-top: 0;
|
||||
border-left: 0;
|
||||
border-right: 0;
|
||||
border-bottom: 1px solid #aaa;
|
||||
}
|
||||
|
||||
table.footnote td, table.footnote th {
|
||||
border: 0 !important;
|
||||
}
|
||||
|
||||
th {
|
||||
text-align: left;
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
table.citation {
|
||||
border-left: solid 1px gray;
|
||||
margin-left: 1px;
|
||||
}
|
||||
|
||||
table.citation td {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
th > :first-child,
|
||||
td > :first-child {
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
th > :last-child,
|
||||
td > :last-child {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
/* -- figures --------------------------------------------------------------- */
|
||||
|
||||
div.figure {
|
||||
margin: 0.5em;
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
div.figure p.caption {
|
||||
padding: 0.3em;
|
||||
}
|
||||
|
||||
div.figure p.caption span.caption-number {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
div.figure p.caption span.caption-text {
|
||||
}
|
||||
|
||||
/* -- field list styles ----------------------------------------------------- */
|
||||
|
||||
table.field-list td, table.field-list th {
|
||||
border: 0 !important;
|
||||
}
|
||||
|
||||
.field-list ul {
|
||||
margin: 0;
|
||||
padding-left: 1em;
|
||||
}
|
||||
|
||||
.field-list p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.field-name {
|
||||
-moz-hyphens: manual;
|
||||
-ms-hyphens: manual;
|
||||
-webkit-hyphens: manual;
|
||||
hyphens: manual;
|
||||
}
|
||||
|
||||
/* -- hlist styles ---------------------------------------------------------- */
|
||||
|
||||
table.hlist {
|
||||
margin: 1em 0;
|
||||
}
|
||||
|
||||
table.hlist td {
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
|
||||
/* -- other body styles ----------------------------------------------------- */
|
||||
|
||||
ol.arabic {
|
||||
list-style: decimal;
|
||||
}
|
||||
|
||||
ol.loweralpha {
|
||||
list-style: lower-alpha;
|
||||
}
|
||||
|
||||
ol.upperalpha {
|
||||
list-style: upper-alpha;
|
||||
}
|
||||
|
||||
ol.lowerroman {
|
||||
list-style: lower-roman;
|
||||
}
|
||||
|
||||
ol.upperroman {
|
||||
list-style: upper-roman;
|
||||
}
|
||||
|
||||
:not(li) > ol > li:first-child > :first-child,
|
||||
:not(li) > ul > li:first-child > :first-child {
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
:not(li) > ol > li:last-child > :last-child,
|
||||
:not(li) > ul > li:last-child > :last-child {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
ol.simple ol p,
|
||||
ol.simple ul p,
|
||||
ul.simple ol p,
|
||||
ul.simple ul p {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
ol.simple > li:not(:first-child) > p,
|
||||
ul.simple > li:not(:first-child) > p {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
ol.simple p,
|
||||
ul.simple p {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
dl.footnote > dt,
|
||||
dl.citation > dt {
|
||||
float: left;
|
||||
margin-right: 0.5em;
|
||||
}
|
||||
|
||||
dl.footnote > dd,
|
||||
dl.citation > dd {
|
||||
margin-bottom: 0em;
|
||||
}
|
||||
|
||||
dl.footnote > dd:after,
|
||||
dl.citation > dd:after {
|
||||
content: "";
|
||||
clear: both;
|
||||
}
|
||||
|
||||
dl.field-list {
|
||||
display: grid;
|
||||
grid-template-columns: fit-content(30%) auto;
|
||||
}
|
||||
|
||||
dl.field-list > dt {
|
||||
font-weight: bold;
|
||||
word-break: break-word;
|
||||
padding-left: 0.5em;
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
dl.field-list > dt:after {
|
||||
content: ":";
|
||||
}
|
||||
|
||||
dl.field-list > dd {
|
||||
padding-left: 0.5em;
|
||||
margin-top: 0em;
|
||||
margin-left: 0em;
|
||||
margin-bottom: 0em;
|
||||
}
|
||||
|
||||
dl {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
dd > :first-child {
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
dd ul, dd table {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
dd {
|
||||
margin-top: 3px;
|
||||
margin-bottom: 10px;
|
||||
margin-left: 30px;
|
||||
}
|
||||
|
||||
dl > dd:last-child,
|
||||
dl > dd:last-child > :last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
dt:target, span.highlighted {
|
||||
background-color: #fbe54e;
|
||||
}
|
||||
|
||||
rect.highlighted {
|
||||
fill: #fbe54e;
|
||||
}
|
||||
|
||||
dl.glossary dt {
|
||||
font-weight: bold;
|
||||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
.optional {
|
||||
font-size: 1.3em;
|
||||
}
|
||||
|
||||
.sig-paren {
|
||||
font-size: larger;
|
||||
}
|
||||
|
||||
.versionmodified {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.system-message {
|
||||
background-color: #fda;
|
||||
padding: 5px;
|
||||
border: 3px solid red;
|
||||
}
|
||||
|
||||
.footnote:target {
|
||||
background-color: #ffa;
|
||||
}
|
||||
|
||||
.line-block {
|
||||
display: block;
|
||||
margin-top: 1em;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
.line-block .line-block {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
margin-left: 1.5em;
|
||||
}
|
||||
|
||||
.guilabel, .menuselection {
|
||||
font-family: sans-serif;
|
||||
}
|
||||
|
||||
.accelerator {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.classifier {
|
||||
font-style: oblique;
|
||||
}
|
||||
|
||||
.classifier:before {
|
||||
font-style: normal;
|
||||
margin: 0.5em;
|
||||
content: ":";
|
||||
}
|
||||
|
||||
abbr, acronym {
|
||||
border-bottom: dotted 1px;
|
||||
cursor: help;
|
||||
}
|
||||
|
||||
/* -- code displays --------------------------------------------------------- */
|
||||
|
||||
pre {
|
||||
overflow: auto;
|
||||
overflow-y: hidden; /* fixes display issues on Chrome browsers */
|
||||
}
|
||||
|
||||
pre, div[class*="highlight-"] {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
span.pre {
|
||||
-moz-hyphens: none;
|
||||
-ms-hyphens: none;
|
||||
-webkit-hyphens: none;
|
||||
hyphens: none;
|
||||
}
|
||||
|
||||
div[class*="highlight-"] {
|
||||
margin: 1em 0;
|
||||
}
|
||||
|
||||
td.linenos pre {
|
||||
border: 0;
|
||||
background-color: transparent;
|
||||
color: #aaa;
|
||||
}
|
||||
|
||||
table.highlighttable {
|
||||
display: block;
|
||||
}
|
||||
|
||||
table.highlighttable tbody {
|
||||
display: block;
|
||||
}
|
||||
|
||||
table.highlighttable tr {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
table.highlighttable td {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
table.highlighttable td.linenos {
|
||||
padding-right: 0.5em;
|
||||
}
|
||||
|
||||
table.highlighttable td.code {
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.highlight .hll {
|
||||
display: block;
|
||||
}
|
||||
|
||||
div.highlight pre,
|
||||
table.highlighttable pre {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
div.code-block-caption + div {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
div.code-block-caption {
|
||||
margin-top: 1em;
|
||||
padding: 2px 5px;
|
||||
font-size: small;
|
||||
}
|
||||
|
||||
div.code-block-caption code {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
table.highlighttable td.linenos,
|
||||
span.linenos,
|
||||
div.doctest > div.highlight span.gp { /* gp: Generic.Prompt */
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
div.code-block-caption span.caption-number {
|
||||
padding: 0.1em 0.3em;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
div.code-block-caption span.caption-text {
|
||||
}
|
||||
|
||||
div.literal-block-wrapper {
|
||||
margin: 1em 0;
|
||||
}
|
||||
|
||||
code.descname {
|
||||
background-color: transparent;
|
||||
font-weight: bold;
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
code.descclassname {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
code.xref, a code {
|
||||
background-color: transparent;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
h1 code, h2 code, h3 code, h4 code, h5 code, h6 code {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.viewcode-link {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.viewcode-back {
|
||||
float: right;
|
||||
font-family: sans-serif;
|
||||
}
|
||||
|
||||
div.viewcode-block:target {
|
||||
margin: -1px -10px;
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
/* -- math display ---------------------------------------------------------- */
|
||||
|
||||
img.math {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
div.body div.math p {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
span.eqno {
|
||||
float: right;
|
||||
}
|
||||
|
||||
span.eqno a.headerlink {
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
div.math:hover a.headerlink {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
/* -- printout stylesheet --------------------------------------------------- */
|
||||
|
||||
@media print {
|
||||
div.document,
|
||||
div.documentwrapper,
|
||||
div.bodywrapper {
|
||||
margin: 0 !important;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
div.sphinxsidebar,
|
||||
div.related,
|
||||
div.footer,
|
||||
#top-link {
|
||||
display: none;
|
||||
}
|
||||
}
|
1
_static/css/badge_only.css
Normal file
@ -0,0 +1 @@
|
||||
.fa:before{-webkit-font-smoothing:antialiased}.clearfix{*zoom:1}.clearfix:after,.clearfix:before{display:table;content:""}.clearfix:after{clear:both}@font-face{font-family:FontAwesome;font-style:normal;font-weight:400;src:url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713?#iefix) format("embedded-opentype"),url(fonts/fontawesome-webfont.woff2?af7ae505a9eed503f8b8e6982036873e) format("woff2"),url(fonts/fontawesome-webfont.woff?fee66e712a8a08eef5805a46892932ad) format("woff"),url(fonts/fontawesome-webfont.ttf?b06871f281fee6b241d60582ae9369b9) format("truetype"),url(fonts/fontawesome-webfont.svg?912ec66d7572ff821749319396470bde#FontAwesome) format("svg")}.fa:before{font-family:FontAwesome;font-style:normal;font-weight:400;line-height:1}.fa:before,a .fa{text-decoration:inherit}.fa:before,a .fa,li .fa{display:inline-block}li .fa-large:before{width:1.875em}ul.fas{list-style-type:none;margin-left:2em;text-indent:-.8em}ul.fas li .fa{width:.8em}ul.fas li .fa-large:before{vertical-align:baseline}.fa-book:before,.icon-book:before{content:"\f02d"}.fa-caret-down:before,.icon-caret-down:before{content:"\f0d7"}.fa-caret-up:before,.icon-caret-up:before{content:"\f0d8"}.fa-caret-left:before,.icon-caret-left:before{content:"\f0d9"}.fa-caret-right:before,.icon-caret-right:before{content:"\f0da"}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;z-index:400}.rst-versions a{color:#2980b9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27ae60}.rst-versions .rst-current-version:after{clear:both;content:"";display:block}.rst-versions .rst-current-version .fa{color:#fcfcfc}.rst-versions .rst-current-version .fa-book,.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#e74c3c;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#f1c40f;color:#000}.rst-versions.shift-up{height:auto;max-height:100%;overflow-y:scroll}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:grey;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:1px solid #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px;max-height:90%}.rst-versions.rst-badge .fa-book,.rst-versions.rst-badge .icon-book{float:none;line-height:30px}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book,.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge>.rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width:768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}}
|
BIN
_static/css/fonts/Roboto-Slab-Bold.woff
Normal file
BIN
_static/css/fonts/Roboto-Slab-Bold.woff2
Normal file
BIN
_static/css/fonts/Roboto-Slab-Regular.woff
Normal file
BIN
_static/css/fonts/Roboto-Slab-Regular.woff2
Normal file
BIN
_static/css/fonts/fontawesome-webfont.eot
Normal file
2671
_static/css/fonts/fontawesome-webfont.svg
Normal file
After Width: | Height: | Size: 434 KiB |
BIN
_static/css/fonts/fontawesome-webfont.ttf
Normal file
BIN
_static/css/fonts/fontawesome-webfont.woff
Normal file
BIN
_static/css/fonts/fontawesome-webfont.woff2
Normal file
BIN
_static/css/fonts/lato-bold-italic.woff
Normal file
BIN
_static/css/fonts/lato-bold-italic.woff2
Normal file
BIN
_static/css/fonts/lato-bold.woff
Normal file
BIN
_static/css/fonts/lato-bold.woff2
Normal file
BIN
_static/css/fonts/lato-normal-italic.woff
Normal file
BIN
_static/css/fonts/lato-normal-italic.woff2
Normal file
BIN
_static/css/fonts/lato-normal.woff
Normal file
BIN
_static/css/fonts/lato-normal.woff2
Normal file
4
_static/css/theme.css
Normal file
321
_static/doctools.js
Normal file
@ -0,0 +1,321 @@
|
||||
/*
|
||||
* doctools.js
|
||||
* ~~~~~~~~~~~
|
||||
*
|
||||
* Sphinx JavaScript utilities for all documentation.
|
||||
*
|
||||
* :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
|
||||
* :license: BSD, see LICENSE for details.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* select a different prefix for underscore
|
||||
*/
|
||||
$u = _.noConflict();
|
||||
|
||||
/**
|
||||
* make the code below compatible with browsers without
|
||||
* an installed firebug like debugger
|
||||
if (!window.console || !console.firebug) {
|
||||
var names = ["log", "debug", "info", "warn", "error", "assert", "dir",
|
||||
"dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace",
|
||||
"profile", "profileEnd"];
|
||||
window.console = {};
|
||||
for (var i = 0; i < names.length; ++i)
|
||||
window.console[names[i]] = function() {};
|
||||
}
|
||||
*/
|
||||
|
||||
/**
|
||||
* small helper function to urldecode strings
|
||||
*
|
||||
* See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent#Decoding_query_parameters_from_a_URL
|
||||
*/
|
||||
jQuery.urldecode = function(x) {
|
||||
if (!x) {
|
||||
return x
|
||||
}
|
||||
return decodeURIComponent(x.replace(/\+/g, ' '));
|
||||
};
|
||||
|
||||
/**
|
||||
* small helper function to urlencode strings
|
||||
*/
|
||||
jQuery.urlencode = encodeURIComponent;
|
||||
|
||||
/**
|
||||
* This function returns the parsed url parameters of the
|
||||
* current request. Multiple values per key are supported,
|
||||
* it will always return arrays of strings for the value parts.
|
||||
*/
|
||||
jQuery.getQueryParameters = function(s) {
|
||||
if (typeof s === 'undefined')
|
||||
s = document.location.search;
|
||||
var parts = s.substr(s.indexOf('?') + 1).split('&');
|
||||
var result = {};
|
||||
for (var i = 0; i < parts.length; i++) {
|
||||
var tmp = parts[i].split('=', 2);
|
||||
var key = jQuery.urldecode(tmp[0]);
|
||||
var value = jQuery.urldecode(tmp[1]);
|
||||
if (key in result)
|
||||
result[key].push(value);
|
||||
else
|
||||
result[key] = [value];
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
/**
|
||||
* highlight a given string on a jquery object by wrapping it in
|
||||
* span elements with the given class name.
|
||||
*/
|
||||
jQuery.fn.highlightText = function(text, className) {
|
||||
function highlight(node, addItems) {
|
||||
if (node.nodeType === 3) {
|
||||
var val = node.nodeValue;
|
||||
var pos = val.toLowerCase().indexOf(text);
|
||||
if (pos >= 0 &&
|
||||
!jQuery(node.parentNode).hasClass(className) &&
|
||||
!jQuery(node.parentNode).hasClass("nohighlight")) {
|
||||
var span;
|
||||
var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg");
|
||||
if (isInSVG) {
|
||||
span = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
|
||||
} else {
|
||||
span = document.createElement("span");
|
||||
span.className = className;
|
||||
}
|
||||
span.appendChild(document.createTextNode(val.substr(pos, text.length)));
|
||||
node.parentNode.insertBefore(span, node.parentNode.insertBefore(
|
||||
document.createTextNode(val.substr(pos + text.length)),
|
||||
node.nextSibling));
|
||||
node.nodeValue = val.substr(0, pos);
|
||||
if (isInSVG) {
|
||||
var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect");
|
||||
var bbox = node.parentElement.getBBox();
|
||||
rect.x.baseVal.value = bbox.x;
|
||||
rect.y.baseVal.value = bbox.y;
|
||||
rect.width.baseVal.value = bbox.width;
|
||||
rect.height.baseVal.value = bbox.height;
|
||||
rect.setAttribute('class', className);
|
||||
addItems.push({
|
||||
"parent": node.parentNode,
|
||||
"target": rect});
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (!jQuery(node).is("button, select, textarea")) {
|
||||
jQuery.each(node.childNodes, function() {
|
||||
highlight(this, addItems);
|
||||
});
|
||||
}
|
||||
}
|
||||
var addItems = [];
|
||||
var result = this.each(function() {
|
||||
highlight(this, addItems);
|
||||
});
|
||||
for (var i = 0; i < addItems.length; ++i) {
|
||||
jQuery(addItems[i].parent).before(addItems[i].target);
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
/*
|
||||
* backward compatibility for jQuery.browser
|
||||
* This will be supported until firefox bug is fixed.
|
||||
*/
|
||||
if (!jQuery.browser) {
|
||||
jQuery.uaMatch = function(ua) {
|
||||
ua = ua.toLowerCase();
|
||||
|
||||
var match = /(chrome)[ \/]([\w.]+)/.exec(ua) ||
|
||||
/(webkit)[ \/]([\w.]+)/.exec(ua) ||
|
||||
/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) ||
|
||||
/(msie) ([\w.]+)/.exec(ua) ||
|
||||
ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) ||
|
||||
[];
|
||||
|
||||
return {
|
||||
browser: match[ 1 ] || "",
|
||||
version: match[ 2 ] || "0"
|
||||
};
|
||||
};
|
||||
jQuery.browser = {};
|
||||
jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Small JavaScript module for the documentation.
|
||||
*/
|
||||
var Documentation = {
|
||||
|
||||
init : function() {
|
||||
this.fixFirefoxAnchorBug();
|
||||
this.highlightSearchWords();
|
||||
this.initIndexTable();
|
||||
if (DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) {
|
||||
this.initOnKeyListeners();
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* i18n support
|
||||
*/
|
||||
TRANSLATIONS : {},
|
||||
PLURAL_EXPR : function(n) { return n === 1 ? 0 : 1; },
|
||||
LOCALE : 'unknown',
|
||||
|
||||
// gettext and ngettext don't access this so that the functions
|
||||
// can safely bound to a different name (_ = Documentation.gettext)
|
||||
gettext : function(string) {
|
||||
var translated = Documentation.TRANSLATIONS[string];
|
||||
if (typeof translated === 'undefined')
|
||||
return string;
|
||||
return (typeof translated === 'string') ? translated : translated[0];
|
||||
},
|
||||
|
||||
ngettext : function(singular, plural, n) {
|
||||
var translated = Documentation.TRANSLATIONS[singular];
|
||||
if (typeof translated === 'undefined')
|
||||
return (n == 1) ? singular : plural;
|
||||
return translated[Documentation.PLURALEXPR(n)];
|
||||
},
|
||||
|
||||
addTranslations : function(catalog) {
|
||||
for (var key in catalog.messages)
|
||||
this.TRANSLATIONS[key] = catalog.messages[key];
|
||||
this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')');
|
||||
this.LOCALE = catalog.locale;
|
||||
},
|
||||
|
||||
/**
|
||||
* add context elements like header anchor links
|
||||
*/
|
||||
addContextElements : function() {
|
||||
$('div[id] > :header:first').each(function() {
|
||||
$('<a class="headerlink">\u00B6</a>').
|
||||
attr('href', '#' + this.id).
|
||||
attr('title', _('Permalink to this headline')).
|
||||
appendTo(this);
|
||||
});
|
||||
$('dt[id]').each(function() {
|
||||
$('<a class="headerlink">\u00B6</a>').
|
||||
attr('href', '#' + this.id).
|
||||
attr('title', _('Permalink to this definition')).
|
||||
appendTo(this);
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* workaround a firefox stupidity
|
||||
* see: https://bugzilla.mozilla.org/show_bug.cgi?id=645075
|
||||
*/
|
||||
fixFirefoxAnchorBug : function() {
|
||||
if (document.location.hash && $.browser.mozilla)
|
||||
window.setTimeout(function() {
|
||||
document.location.href += '';
|
||||
}, 10);
|
||||
},
|
||||
|
||||
/**
|
||||
* highlight the search words provided in the url in the text
|
||||
*/
|
||||
highlightSearchWords : function() {
|
||||
var params = $.getQueryParameters();
|
||||
var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : [];
|
||||
if (terms.length) {
|
||||
var body = $('div.body');
|
||||
if (!body.length) {
|
||||
body = $('body');
|
||||
}
|
||||
window.setTimeout(function() {
|
||||
$.each(terms, function() {
|
||||
body.highlightText(this.toLowerCase(), 'highlighted');
|
||||
});
|
||||
}, 10);
|
||||
$('<p class="highlight-link"><a href="javascript:Documentation.' +
|
||||
'hideSearchWords()">' + _('Hide Search Matches') + '</a></p>')
|
||||
.appendTo($('#searchbox'));
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* init the domain index toggle buttons
|
||||
*/
|
||||
initIndexTable : function() {
|
||||
var togglers = $('img.toggler').click(function() {
|
||||
var src = $(this).attr('src');
|
||||
var idnum = $(this).attr('id').substr(7);
|
||||
$('tr.cg-' + idnum).toggle();
|
||||
if (src.substr(-9) === 'minus.png')
|
||||
$(this).attr('src', src.substr(0, src.length-9) + 'plus.png');
|
||||
else
|
||||
$(this).attr('src', src.substr(0, src.length-8) + 'minus.png');
|
||||
}).css('display', '');
|
||||
if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) {
|
||||
togglers.click();
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* helper function to hide the search marks again
|
||||
*/
|
||||
hideSearchWords : function() {
|
||||
$('#searchbox .highlight-link').fadeOut(300);
|
||||
$('span.highlighted').removeClass('highlighted');
|
||||
},
|
||||
|
||||
/**
|
||||
* make the url absolute
|
||||
*/
|
||||
makeURL : function(relativeURL) {
|
||||
return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL;
|
||||
},
|
||||
|
||||
/**
|
||||
* get the current relative url
|
||||
*/
|
||||
getCurrentURL : function() {
|
||||
var path = document.location.pathname;
|
||||
var parts = path.split(/\//);
|
||||
$.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() {
|
||||
if (this === '..')
|
||||
parts.pop();
|
||||
});
|
||||
var url = parts.join('/');
|
||||
return path.substring(url.lastIndexOf('/') + 1, path.length - 1);
|
||||
},
|
||||
|
||||
initOnKeyListeners: function() {
|
||||
$(document).keydown(function(event) {
|
||||
var activeElementType = document.activeElement.tagName;
|
||||
// don't navigate when in search box, textarea, dropdown or button
|
||||
if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT'
|
||||
&& activeElementType !== 'BUTTON' && !event.altKey && !event.ctrlKey && !event.metaKey
|
||||
&& !event.shiftKey) {
|
||||
switch (event.keyCode) {
|
||||
case 37: // left
|
||||
var prevHref = $('link[rel="prev"]').prop('href');
|
||||
if (prevHref) {
|
||||
window.location.href = prevHref;
|
||||
return false;
|
||||
}
|
||||
case 39: // right
|
||||
var nextHref = $('link[rel="next"]').prop('href');
|
||||
if (nextHref) {
|
||||
window.location.href = nextHref;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
// quick alias for translations
|
||||
_ = Documentation.gettext;
|
||||
|
||||
$(document).ready(function() {
|
||||
Documentation.init();
|
||||
});
|
BIN
_static/favicon.ico
Normal file
After Width: | Height: | Size: 198 B |
BIN
_static/file.png
Normal file
After Width: | Height: | Size: 286 B |
10872
_static/jquery-3.5.1.js
vendored
Normal file
2
_static/jquery.js
vendored
Normal file
1
_static/js/badge_only.js
Normal file
@ -0,0 +1 @@
|
||||
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=4)}({4:function(e,t,r){}});
|
4
_static/js/html5shiv-printshiv.min.js
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
/**
|
||||
* @preserve HTML5 Shiv 3.7.3-pre | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
|
||||
*/
|
||||
!function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x<style>"+b+"</style>",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=y.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=y.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),y.elements=c+" "+a,j(b)}function f(a){var b=x[a[v]];return b||(b={},w++,a[v]=w,x[w]=b),b}function g(a,c,d){if(c||(c=b),q)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():u.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||t.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),q)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return y.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(y,b.frag)}function j(a){a||(a=b);var d=f(a);return!y.shivCSS||p||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),q||i(a,d),a}function k(a){for(var b,c=a.getElementsByTagName("*"),e=c.length,f=RegExp("^(?:"+d().join("|")+")$","i"),g=[];e--;)b=c[e],f.test(b.nodeName)&&g.push(b.applyElement(l(b)));return g}function l(a){for(var b,c=a.attributes,d=c.length,e=a.ownerDocument.createElement(A+":"+a.nodeName);d--;)b=c[d],b.specified&&e.setAttribute(b.nodeName,b.nodeValue);return e.style.cssText=a.style.cssText,e}function m(a){for(var b,c=a.split("{"),e=c.length,f=RegExp("(^|[\\s,>+~])("+d().join("|")+")(?=[[\\s,>+~#.:]|$)","gi"),g="$1"+A+"\\:$2";e--;)b=c[e]=c[e].split("}"),b[b.length-1]=b[b.length-1].replace(f,g),c[e]=b.join("}");return c.join("{")}function n(a){for(var b=a.length;b--;)a[b].removeNode()}function o(a){function b(){clearTimeout(g._removeSheetTimer),d&&d.removeNode(!0),d=null}var d,e,g=f(a),h=a.namespaces,i=a.parentWindow;return!B||a.printShived?a:("undefined"==typeof h[A]&&h.add(A),i.attachEvent("onbeforeprint",function(){b();for(var f,g,h,i=a.styleSheets,j=[],l=i.length,n=Array(l);l--;)n[l]=i[l];for(;h=n.pop();)if(!h.disabled&&z.test(h.media)){try{f=h.imports,g=f.length}catch(o){g=0}for(l=0;g>l;l++)n.push(f[l]);try{j.push(h.cssText)}catch(o){}}j=m(j.reverse().join("")),e=k(a),d=c(a,j)}),i.attachEvent("onafterprint",function(){n(e),clearTimeout(g._removeSheetTimer),g._removeSheetTimer=setTimeout(b,500)}),a.printShived=!0,a)}var p,q,r="3.7.3",s=a.html5||{},t=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,u=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,v="_html5shiv",w=0,x={};!function(){try{var a=b.createElement("a");a.innerHTML="<xyz></xyz>",p="hidden"in a,q=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){p=!0,q=!0}}();var y={elements:s.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:r,shivCSS:s.shivCSS!==!1,supportsUnknownElements:q,shivMethods:s.shivMethods!==!1,type:"default",shivDocument:j,createElement:g,createDocumentFragment:h,addElements:e};a.html5=y,j(b);var z=/^$|\b(?:all|print)\b/,A="html5shiv",B=!q&&function(){var c=b.documentElement;return!("undefined"==typeof b.namespaces||"undefined"==typeof b.parentWindow||"undefined"==typeof c.applyElement||"undefined"==typeof c.removeNode||"undefined"==typeof a.attachEvent)}();y.type+=" print",y.shivPrint=o,o(b),"object"==typeof module&&module.exports&&(module.exports=y)}("undefined"!=typeof window?window:this,document);
|
4
_static/js/html5shiv.min.js
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
/**
|
||||
* @preserve HTML5 Shiv 3.7.3 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
|
||||
*/
|
||||
!function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x<style>"+b+"</style>",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=t.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=t.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),t.elements=c+" "+a,j(b)}function f(a){var b=s[a[q]];return b||(b={},r++,a[q]=r,s[r]=b),b}function g(a,c,d){if(c||(c=b),l)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():p.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||o.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),l)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return t.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(t,b.frag)}function j(a){a||(a=b);var d=f(a);return!t.shivCSS||k||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),l||i(a,d),a}var k,l,m="3.7.3-pre",n=a.html5||{},o=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,p=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,q="_html5shiv",r=0,s={};!function(){try{var a=b.createElement("a");a.innerHTML="<xyz></xyz>",k="hidden"in a,l=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){k=!0,l=!0}}();var t={elements:n.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:m,shivCSS:n.shivCSS!==!1,supportsUnknownElements:l,shivMethods:n.shivMethods!==!1,type:"default",shivDocument:j,createElement:g,createDocumentFragment:h,addElements:e};a.html5=t,j(b),"object"==typeof module&&module.exports&&(module.exports=t)}("undefined"!=typeof window?window:this,document);
|
1
_static/js/theme.js
Normal file
@ -0,0 +1 @@
|
||||
!function(n){var e={};function t(i){if(e[i])return e[i].exports;var o=e[i]={i:i,l:!1,exports:{}};return n[i].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=n,t.c=e,t.d=function(n,e,i){t.o(n,e)||Object.defineProperty(n,e,{enumerable:!0,get:i})},t.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},t.t=function(n,e){if(1&e&&(n=t(n)),8&e)return n;if(4&e&&"object"==typeof n&&n&&n.__esModule)return n;var i=Object.create(null);if(t.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:n}),2&e&&"string"!=typeof n)for(var o in n)t.d(i,o,function(e){return n[e]}.bind(null,o));return i},t.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(e,"a",e),e},t.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},t.p="",t(t.s=0)}([function(n,e,t){t(1),n.exports=t(3)},function(n,e,t){(function(){var e="undefined"!=typeof window?window.jQuery:t(2);n.exports.ThemeNav={navBar:null,win:null,winScroll:!1,winResize:!1,linkScroll:!1,winPosition:0,winHeight:null,docHeight:null,isRunning:!1,enable:function(n){var t=this;void 0===n&&(n=!0),t.isRunning||(t.isRunning=!0,e((function(e){t.init(e),t.reset(),t.win.on("hashchange",t.reset),n&&t.win.on("scroll",(function(){t.linkScroll||t.winScroll||(t.winScroll=!0,requestAnimationFrame((function(){t.onScroll()})))})),t.win.on("resize",(function(){t.winResize||(t.winResize=!0,requestAnimationFrame((function(){t.onResize()})))})),t.onResize()})))},enableSticky:function(){this.enable(!0)},init:function(n){n(document);var e=this;this.navBar=n("div.wy-side-scroll:first"),this.win=n(window),n(document).on("click","[data-toggle='wy-nav-top']",(function(){n("[data-toggle='wy-nav-shift']").toggleClass("shift"),n("[data-toggle='rst-versions']").toggleClass("shift")})).on("click",".wy-menu-vertical .current ul li a",(function(){var t=n(this);n("[data-toggle='wy-nav-shift']").removeClass("shift"),n("[data-toggle='rst-versions']").toggleClass("shift"),e.toggleCurrent(t),e.hashChange()})).on("click","[data-toggle='rst-current-version']",(function(){n("[data-toggle='rst-versions']").toggleClass("shift-up")})),n("table.docutils:not(.field-list,.footnote,.citation)").wrap("<div class='wy-table-responsive'></div>"),n("table.docutils.footnote").wrap("<div class='wy-table-responsive footnote'></div>"),n("table.docutils.citation").wrap("<div class='wy-table-responsive citation'></div>"),n(".wy-menu-vertical ul").not(".simple").siblings("a").each((function(){var t=n(this);expand=n('<span class="toctree-expand"></span>'),expand.on("click",(function(n){return e.toggleCurrent(t),n.stopPropagation(),!1})),t.prepend(expand)}))},reset:function(){var n=encodeURI(window.location.hash)||"#";try{var e=$(".wy-menu-vertical"),t=e.find('[href="'+n+'"]');if(0===t.length){var i=$('.document [id="'+n.substring(1)+'"]').closest("div.section");0===(t=e.find('[href="#'+i.attr("id")+'"]')).length&&(t=e.find('[href="#"]'))}t.length>0&&($(".wy-menu-vertical .current").removeClass("current"),t.addClass("current"),t.closest("li.toctree-l1").addClass("current"),t.closest("li.toctree-l1").parent().addClass("current"),t.closest("li.toctree-l1").addClass("current"),t.closest("li.toctree-l2").addClass("current"),t.closest("li.toctree-l3").addClass("current"),t.closest("li.toctree-l4").addClass("current"),t.closest("li.toctree-l5").addClass("current"),t[0].scrollIntoView())}catch(n){console.log("Error expanding nav for anchor",n)}},onScroll:function(){this.winScroll=!1;var n=this.win.scrollTop(),e=n+this.winHeight,t=this.navBar.scrollTop()+(n-this.winPosition);n<0||e>this.docHeight||(this.navBar.scrollTop(t),this.winPosition=n)},onResize:function(){this.winResize=!1,this.winHeight=this.win.height(),this.docHeight=$(document).height()},hashChange:function(){this.linkScroll=!0,this.win.one("hashchange",(function(){this.linkScroll=!1}))},toggleCurrent:function(n){var e=n.closest("li");e.siblings("li.current").removeClass("current"),e.siblings().find("li.current").removeClass("current"),e.find("> ul li.current").removeClass("current"),e.toggleClass("current")}},"undefined"!=typeof window&&(window.SphinxRtdTheme={Navigation:n.exports.ThemeNav,StickyNav:n.exports.ThemeNav}),function(){for(var n=0,e=["ms","moz","webkit","o"],t=0;t<e.length&&!window.requestAnimationFrame;++t)window.requestAnimationFrame=window[e[t]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[e[t]+"CancelAnimationFrame"]||window[e[t]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(e,t){var i=(new Date).getTime(),o=Math.max(0,16-(i-n)),r=window.setTimeout((function(){e(i+o)}),o);return n=i+o,r}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(n){clearTimeout(n)})}()}).call(window)},function(n,e){n.exports=jQuery},function(n,e,t){}]);
|
BIN
_static/minus.png
Normal file
After Width: | Height: | Size: 90 B |
BIN
_static/plus.png
Normal file
After Width: | Height: | Size: 90 B |
77
_static/pygments.css
Normal file
@ -0,0 +1,77 @@
|
||||
pre { line-height: 125%; }
|
||||
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
|
||||
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
|
||||
td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
|
||||
span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
|
||||
.highlight .hll { background-color: #49483e }
|
||||
.highlight { background: #272822; color: #f8f8f2 }
|
||||
.highlight .c { color: #75715e } /* Comment */
|
||||
.highlight .err { color: #960050; background-color: #1e0010 } /* Error */
|
||||
.highlight .k { color: #66d9ef } /* Keyword */
|
||||
.highlight .l { color: #ae81ff } /* Literal */
|
||||
.highlight .n { color: #f8f8f2 } /* Name */
|
||||
.highlight .o { color: #f92672 } /* Operator */
|
||||
.highlight .p { color: #f8f8f2 } /* Punctuation */
|
||||
.highlight .ch { color: #75715e } /* Comment.Hashbang */
|
||||
.highlight .cm { color: #75715e } /* Comment.Multiline */
|
||||
.highlight .cp { color: #75715e } /* Comment.Preproc */
|
||||
.highlight .cpf { color: #75715e } /* Comment.PreprocFile */
|
||||
.highlight .c1 { color: #75715e } /* Comment.Single */
|
||||
.highlight .cs { color: #75715e } /* Comment.Special */
|
||||
.highlight .gd { color: #f92672 } /* Generic.Deleted */
|
||||
.highlight .ge { font-style: italic } /* Generic.Emph */
|
||||
.highlight .gi { color: #a6e22e } /* Generic.Inserted */
|
||||
.highlight .go { color: #66d9ef } /* Generic.Output */
|
||||
.highlight .gp { color: #f92672; font-weight: bold } /* Generic.Prompt */
|
||||
.highlight .gs { font-weight: bold } /* Generic.Strong */
|
||||
.highlight .gu { color: #75715e } /* Generic.Subheading */
|
||||
.highlight .kc { color: #66d9ef } /* Keyword.Constant */
|
||||
.highlight .kd { color: #66d9ef } /* Keyword.Declaration */
|
||||
.highlight .kn { color: #f92672 } /* Keyword.Namespace */
|
||||
.highlight .kp { color: #66d9ef } /* Keyword.Pseudo */
|
||||
.highlight .kr { color: #66d9ef } /* Keyword.Reserved */
|
||||
.highlight .kt { color: #66d9ef } /* Keyword.Type */
|
||||
.highlight .ld { color: #e6db74 } /* Literal.Date */
|
||||
.highlight .m { color: #ae81ff } /* Literal.Number */
|
||||
.highlight .s { color: #e6db74 } /* Literal.String */
|
||||
.highlight .na { color: #a6e22e } /* Name.Attribute */
|
||||
.highlight .nb { color: #f8f8f2 } /* Name.Builtin */
|
||||
.highlight .nc { color: #a6e22e } /* Name.Class */
|
||||
.highlight .no { color: #66d9ef } /* Name.Constant */
|
||||
.highlight .nd { color: #a6e22e } /* Name.Decorator */
|
||||
.highlight .ni { color: #f8f8f2 } /* Name.Entity */
|
||||
.highlight .ne { color: #a6e22e } /* Name.Exception */
|
||||
.highlight .nf { color: #a6e22e } /* Name.Function */
|
||||
.highlight .nl { color: #f8f8f2 } /* Name.Label */
|
||||
.highlight .nn { color: #f8f8f2 } /* Name.Namespace */
|
||||
.highlight .nx { color: #a6e22e } /* Name.Other */
|
||||
.highlight .py { color: #f8f8f2 } /* Name.Property */
|
||||
.highlight .nt { color: #f92672 } /* Name.Tag */
|
||||
.highlight .nv { color: #f8f8f2 } /* Name.Variable */
|
||||
.highlight .ow { color: #f92672 } /* Operator.Word */
|
||||
.highlight .w { color: #f8f8f2 } /* Text.Whitespace */
|
||||
.highlight .mb { color: #ae81ff } /* Literal.Number.Bin */
|
||||
.highlight .mf { color: #ae81ff } /* Literal.Number.Float */
|
||||
.highlight .mh { color: #ae81ff } /* Literal.Number.Hex */
|
||||
.highlight .mi { color: #ae81ff } /* Literal.Number.Integer */
|
||||
.highlight .mo { color: #ae81ff } /* Literal.Number.Oct */
|
||||
.highlight .sa { color: #e6db74 } /* Literal.String.Affix */
|
||||
.highlight .sb { color: #e6db74 } /* Literal.String.Backtick */
|
||||
.highlight .sc { color: #e6db74 } /* Literal.String.Char */
|
||||
.highlight .dl { color: #e6db74 } /* Literal.String.Delimiter */
|
||||
.highlight .sd { color: #e6db74 } /* Literal.String.Doc */
|
||||
.highlight .s2 { color: #e6db74 } /* Literal.String.Double */
|
||||
.highlight .se { color: #ae81ff } /* Literal.String.Escape */
|
||||
.highlight .sh { color: #e6db74 } /* Literal.String.Heredoc */
|
||||
.highlight .si { color: #e6db74 } /* Literal.String.Interpol */
|
||||
.highlight .sx { color: #e6db74 } /* Literal.String.Other */
|
||||
.highlight .sr { color: #e6db74 } /* Literal.String.Regex */
|
||||
.highlight .s1 { color: #e6db74 } /* Literal.String.Single */
|
||||
.highlight .ss { color: #e6db74 } /* Literal.String.Symbol */
|
||||
.highlight .bp { color: #f8f8f2 } /* Name.Builtin.Pseudo */
|
||||
.highlight .fm { color: #a6e22e } /* Name.Function.Magic */
|
||||
.highlight .vc { color: #f8f8f2 } /* Name.Variable.Class */
|
||||
.highlight .vg { color: #f8f8f2 } /* Name.Variable.Global */
|
||||
.highlight .vi { color: #f8f8f2 } /* Name.Variable.Instance */
|
||||
.highlight .vm { color: #f8f8f2 } /* Name.Variable.Magic */
|
||||
.highlight .il { color: #ae81ff } /* Literal.Number.Integer.Long */
|
522
_static/searchtools.js
Normal file
@ -0,0 +1,522 @@
|
||||
/*
|
||||
* searchtools.js
|
||||
* ~~~~~~~~~~~~~~~~
|
||||
*
|
||||
* Sphinx JavaScript utilities for the full-text search.
|
||||
*
|
||||
* :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
|
||||
* :license: BSD, see LICENSE for details.
|
||||
*
|
||||
*/
|
||||
|
||||
if (!Scorer) {
|
||||
/**
|
||||
* Simple result scoring code.
|
||||
*/
|
||||
var Scorer = {
|
||||
// Implement the following function to further tweak the score for each result
|
||||
// The function takes a result array [filename, title, anchor, descr, score]
|
||||
// and returns the new score.
|
||||
/*
|
||||
score: function(result) {
|
||||
return result[4];
|
||||
},
|
||||
*/
|
||||
|
||||
// query matches the full name of an object
|
||||
objNameMatch: 11,
|
||||
// or matches in the last dotted part of the object name
|
||||
objPartialMatch: 6,
|
||||
// Additive scores depending on the priority of the object
|
||||
objPrio: {0: 15, // used to be importantResults
|
||||
1: 5, // used to be objectResults
|
||||
2: -5}, // used to be unimportantResults
|
||||
// Used when the priority is not in the mapping.
|
||||
objPrioDefault: 0,
|
||||
|
||||
// query found in title
|
||||
title: 15,
|
||||
partialTitle: 7,
|
||||
// query found in terms
|
||||
term: 5,
|
||||
partialTerm: 2
|
||||
};
|
||||
}
|
||||
|
||||
if (!splitQuery) {
|
||||
function splitQuery(query) {
|
||||
return query.split(/\s+/);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Search Module
|
||||
*/
|
||||
var Search = {
|
||||
|
||||
_index : null,
|
||||
_queued_query : null,
|
||||
_pulse_status : -1,
|
||||
|
||||
htmlToText : function(htmlString) {
|
||||
var virtualDocument = document.implementation.createHTMLDocument('virtual');
|
||||
var htmlElement = $(htmlString, virtualDocument);
|
||||
htmlElement.find('.headerlink').remove();
|
||||
docContent = htmlElement.find('[role=main]')[0];
|
||||
if(docContent === undefined) {
|
||||
console.warn("Content block not found. Sphinx search tries to obtain it " +
|
||||
"via '[role=main]'. Could you check your theme or template.");
|
||||
return "";
|
||||
}
|
||||
return docContent.textContent || docContent.innerText;
|
||||
},
|
||||
|
||||
init : function() {
|
||||
var params = $.getQueryParameters();
|
||||
if (params.q) {
|
||||
var query = params.q[0];
|
||||
$('input[name="q"]')[0].value = query;
|
||||
this.performSearch(query);
|
||||
}
|
||||
},
|
||||
|
||||
loadIndex : function(url) {
|
||||
$.ajax({type: "GET", url: url, data: null,
|
||||
dataType: "script", cache: true,
|
||||
complete: function(jqxhr, textstatus) {
|
||||
if (textstatus != "success") {
|
||||
document.getElementById("searchindexloader").src = url;
|
||||
}
|
||||
}});
|
||||
},
|
||||
|
||||
setIndex : function(index) {
|
||||
var q;
|
||||
this._index = index;
|
||||
if ((q = this._queued_query) !== null) {
|
||||
this._queued_query = null;
|
||||
Search.query(q);
|
||||
}
|
||||
},
|
||||
|
||||
hasIndex : function() {
|
||||
return this._index !== null;
|
||||
},
|
||||
|
||||
deferQuery : function(query) {
|
||||
this._queued_query = query;
|
||||
},
|
||||
|
||||
stopPulse : function() {
|
||||
this._pulse_status = 0;
|
||||
},
|
||||
|
||||
startPulse : function() {
|
||||
if (this._pulse_status >= 0)
|
||||
return;
|
||||
function pulse() {
|
||||
var i;
|
||||
Search._pulse_status = (Search._pulse_status + 1) % 4;
|
||||
var dotString = '';
|
||||
for (i = 0; i < Search._pulse_status; i++)
|
||||
dotString += '.';
|
||||
Search.dots.text(dotString);
|
||||
if (Search._pulse_status > -1)
|
||||
window.setTimeout(pulse, 500);
|
||||
}
|
||||
pulse();
|
||||
},
|
||||
|
||||
/**
|
||||
* perform a search for something (or wait until index is loaded)
|
||||
*/
|
||||
performSearch : function(query) {
|
||||
// create the required interface elements
|
||||
this.out = $('#search-results');
|
||||
this.title = $('<h2>' + _('Searching') + '</h2>').appendTo(this.out);
|
||||
this.dots = $('<span></span>').appendTo(this.title);
|
||||
this.status = $('<p class="search-summary"> </p>').appendTo(this.out);
|
||||
this.output = $('<ul class="search"/>').appendTo(this.out);
|
||||
|
||||
$('#search-progress').text(_('Preparing search...'));
|
||||
this.startPulse();
|
||||
|
||||
// index already loaded, the browser was quick!
|
||||
if (this.hasIndex())
|
||||
this.query(query);
|
||||
else
|
||||
this.deferQuery(query);
|
||||
},
|
||||
|
||||
/**
|
||||
* execute search (requires search index to be loaded)
|
||||
*/
|
||||
query : function(query) {
|
||||
var i;
|
||||
|
||||
// stem the searchterms and add them to the correct list
|
||||
var stemmer = new Stemmer();
|
||||
var searchterms = [];
|
||||
var excluded = [];
|
||||
var hlterms = [];
|
||||
var tmp = splitQuery(query);
|
||||
var objectterms = [];
|
||||
for (i = 0; i < tmp.length; i++) {
|
||||
if (tmp[i] !== "") {
|
||||
objectterms.push(tmp[i].toLowerCase());
|
||||
}
|
||||
|
||||
if ($u.indexOf(stopwords, tmp[i].toLowerCase()) != -1 || tmp[i] === "") {
|
||||
// skip this "word"
|
||||
continue;
|
||||
}
|
||||
// stem the word
|
||||
var word = stemmer.stemWord(tmp[i].toLowerCase());
|
||||
// prevent stemmer from cutting word smaller than two chars
|
||||
if(word.length < 3 && tmp[i].length >= 3) {
|
||||
word = tmp[i];
|
||||
}
|
||||
var toAppend;
|
||||
// select the correct list
|
||||
if (word[0] == '-') {
|
||||
toAppend = excluded;
|
||||
word = word.substr(1);
|
||||
}
|
||||
else {
|
||||
toAppend = searchterms;
|
||||
hlterms.push(tmp[i].toLowerCase());
|
||||
}
|
||||
// only add if not already in the list
|
||||
if (!$u.contains(toAppend, word))
|
||||
toAppend.push(word);
|
||||
}
|
||||
var highlightstring = '?highlight=' + $.urlencode(hlterms.join(" "));
|
||||
|
||||
// console.debug('SEARCH: searching for:');
|
||||
// console.info('required: ', searchterms);
|
||||
// console.info('excluded: ', excluded);
|
||||
|
||||
// prepare search
|
||||
var terms = this._index.terms;
|
||||
var titleterms = this._index.titleterms;
|
||||
|
||||
// array of [filename, title, anchor, descr, score]
|
||||
var results = [];
|
||||
$('#search-progress').empty();
|
||||
|
||||
// lookup as object
|
||||
for (i = 0; i < objectterms.length; i++) {
|
||||
var others = [].concat(objectterms.slice(0, i),
|
||||
objectterms.slice(i+1, objectterms.length));
|
||||
results = results.concat(this.performObjectSearch(objectterms[i], others));
|
||||
}
|
||||
|
||||
// lookup as search terms in fulltext
|
||||
results = results.concat(this.performTermsSearch(searchterms, excluded, terms, titleterms));
|
||||
|
||||
// let the scorer override scores with a custom scoring function
|
||||
if (Scorer.score) {
|
||||
for (i = 0; i < results.length; i++)
|
||||
results[i][4] = Scorer.score(results[i]);
|
||||
}
|
||||
|
||||
// now sort the results by score (in opposite order of appearance, since the
|
||||
// display function below uses pop() to retrieve items) and then
|
||||
// alphabetically
|
||||
results.sort(function(a, b) {
|
||||
var left = a[4];
|
||||
var right = b[4];
|
||||
if (left > right) {
|
||||
return 1;
|
||||
} else if (left < right) {
|
||||
return -1;
|
||||
} else {
|
||||
// same score: sort alphabetically
|
||||
left = a[1].toLowerCase();
|
||||
right = b[1].toLowerCase();
|
||||
return (left > right) ? -1 : ((left < right) ? 1 : 0);
|
||||
}
|
||||
});
|
||||
|
||||
// for debugging
|
||||
//Search.lastresults = results.slice(); // a copy
|
||||
//console.info('search results:', Search.lastresults);
|
||||
|
||||
// print the results
|
||||
var resultCount = results.length;
|
||||
function displayNextItem() {
|
||||
// results left, load the summary and display it
|
||||
if (results.length) {
|
||||
var item = results.pop();
|
||||
var listItem = $('<li></li>');
|
||||
var requestUrl = "";
|
||||
var linkUrl = "";
|
||||
if (DOCUMENTATION_OPTIONS.BUILDER === 'dirhtml') {
|
||||
// dirhtml builder
|
||||
var dirname = item[0] + '/';
|
||||
if (dirname.match(/\/index\/$/)) {
|
||||
dirname = dirname.substring(0, dirname.length-6);
|
||||
} else if (dirname == 'index/') {
|
||||
dirname = '';
|
||||
}
|
||||
requestUrl = DOCUMENTATION_OPTIONS.URL_ROOT + dirname;
|
||||
linkUrl = requestUrl;
|
||||
|
||||
} else {
|
||||
// normal html builders
|
||||
requestUrl = DOCUMENTATION_OPTIONS.URL_ROOT + item[0] + DOCUMENTATION_OPTIONS.FILE_SUFFIX;
|
||||
linkUrl = item[0] + DOCUMENTATION_OPTIONS.LINK_SUFFIX;
|
||||
}
|
||||
listItem.append($('<a/>').attr('href',
|
||||
linkUrl +
|
||||
highlightstring + item[2]).html(item[1]));
|
||||
if (item[3]) {
|
||||
listItem.append($('<span> (' + item[3] + ')</span>'));
|
||||
Search.output.append(listItem);
|
||||
setTimeout(function() {
|
||||
displayNextItem();
|
||||
}, 5);
|
||||
} else if (DOCUMENTATION_OPTIONS.HAS_SOURCE) {
|
||||
$.ajax({url: requestUrl,
|
||||
dataType: "text",
|
||||
complete: function(jqxhr, textstatus) {
|
||||
var data = jqxhr.responseText;
|
||||
if (data !== '' && data !== undefined) {
|
||||
listItem.append(Search.makeSearchSummary(data, searchterms, hlterms));
|
||||
}
|
||||
Search.output.append(listItem);
|
||||
setTimeout(function() {
|
||||
displayNextItem();
|
||||
}, 5);
|
||||
}});
|
||||
} else {
|
||||
// no source available, just display title
|
||||
Search.output.append(listItem);
|
||||
setTimeout(function() {
|
||||
displayNextItem();
|
||||
}, 5);
|
||||
}
|
||||
}
|
||||
// search finished, update title and status message
|
||||
else {
|
||||
Search.stopPulse();
|
||||
Search.title.text(_('Search Results'));
|
||||
if (!resultCount)
|
||||
Search.status.text(_('Your search did not match any documents. Please make sure that all words are spelled correctly and that you\'ve selected enough categories.'));
|
||||
else
|
||||
Search.status.text(_('Search finished, found %s page(s) matching the search query.').replace('%s', resultCount));
|
||||
Search.status.fadeIn(500);
|
||||
}
|
||||
}
|
||||
displayNextItem();
|
||||
},
|
||||
|
||||
/**
|
||||
* search for object names
|
||||
*/
|
||||
performObjectSearch : function(object, otherterms) {
|
||||
var filenames = this._index.filenames;
|
||||
var docnames = this._index.docnames;
|
||||
var objects = this._index.objects;
|
||||
var objnames = this._index.objnames;
|
||||
var titles = this._index.titles;
|
||||
|
||||
var i;
|
||||
var results = [];
|
||||
|
||||
for (var prefix in objects) {
|
||||
for (var name in objects[prefix]) {
|
||||
var fullname = (prefix ? prefix + '.' : '') + name;
|
||||
var fullnameLower = fullname.toLowerCase()
|
||||
if (fullnameLower.indexOf(object) > -1) {
|
||||
var score = 0;
|
||||
var parts = fullnameLower.split('.');
|
||||
// check for different match types: exact matches of full name or
|
||||
// "last name" (i.e. last dotted part)
|
||||
if (fullnameLower == object || parts[parts.length - 1] == object) {
|
||||
score += Scorer.objNameMatch;
|
||||
// matches in last name
|
||||
} else if (parts[parts.length - 1].indexOf(object) > -1) {
|
||||
score += Scorer.objPartialMatch;
|
||||
}
|
||||
var match = objects[prefix][name];
|
||||
var objname = objnames[match[1]][2];
|
||||
var title = titles[match[0]];
|
||||
// If more than one term searched for, we require other words to be
|
||||
// found in the name/title/description
|
||||
if (otherterms.length > 0) {
|
||||
var haystack = (prefix + ' ' + name + ' ' +
|
||||
objname + ' ' + title).toLowerCase();
|
||||
var allfound = true;
|
||||
for (i = 0; i < otherterms.length; i++) {
|
||||
if (haystack.indexOf(otherterms[i]) == -1) {
|
||||
allfound = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!allfound) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
var descr = objname + _(', in ') + title;
|
||||
|
||||
var anchor = match[3];
|
||||
if (anchor === '')
|
||||
anchor = fullname;
|
||||
else if (anchor == '-')
|
||||
anchor = objnames[match[1]][1] + '-' + fullname;
|
||||
// add custom score for some objects according to scorer
|
||||
if (Scorer.objPrio.hasOwnProperty(match[2])) {
|
||||
score += Scorer.objPrio[match[2]];
|
||||
} else {
|
||||
score += Scorer.objPrioDefault;
|
||||
}
|
||||
results.push([docnames[match[0]], fullname, '#'+anchor, descr, score, filenames[match[0]]]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return results;
|
||||
},
|
||||
|
||||
/**
|
||||
* See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions
|
||||
*/
|
||||
escapeRegExp : function(string) {
|
||||
return string.replace(/[.*+\-?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string
|
||||
},
|
||||
|
||||
/**
|
||||
* search for full-text terms in the index
|
||||
*/
|
||||
performTermsSearch : function(searchterms, excluded, terms, titleterms) {
|
||||
var docnames = this._index.docnames;
|
||||
var filenames = this._index.filenames;
|
||||
var titles = this._index.titles;
|
||||
|
||||
var i, j, file;
|
||||
var fileMap = {};
|
||||
var scoreMap = {};
|
||||
var results = [];
|
||||
|
||||
// perform the search on the required terms
|
||||
for (i = 0; i < searchterms.length; i++) {
|
||||
var word = searchterms[i];
|
||||
var files = [];
|
||||
var _o = [
|
||||
{files: terms[word], score: Scorer.term},
|
||||
{files: titleterms[word], score: Scorer.title}
|
||||
];
|
||||
// add support for partial matches
|
||||
if (word.length > 2) {
|
||||
var word_regex = this.escapeRegExp(word);
|
||||
for (var w in terms) {
|
||||
if (w.match(word_regex) && !terms[word]) {
|
||||
_o.push({files: terms[w], score: Scorer.partialTerm})
|
||||
}
|
||||
}
|
||||
for (var w in titleterms) {
|
||||
if (w.match(word_regex) && !titleterms[word]) {
|
||||
_o.push({files: titleterms[w], score: Scorer.partialTitle})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// no match but word was a required one
|
||||
if ($u.every(_o, function(o){return o.files === undefined;})) {
|
||||
break;
|
||||
}
|
||||
// found search word in contents
|
||||
$u.each(_o, function(o) {
|
||||
var _files = o.files;
|
||||
if (_files === undefined)
|
||||
return
|
||||
|
||||
if (_files.length === undefined)
|
||||
_files = [_files];
|
||||
files = files.concat(_files);
|
||||
|
||||
// set score for the word in each file to Scorer.term
|
||||
for (j = 0; j < _files.length; j++) {
|
||||
file = _files[j];
|
||||
if (!(file in scoreMap))
|
||||
scoreMap[file] = {};
|
||||
scoreMap[file][word] = o.score;
|
||||
}
|
||||
});
|
||||
|
||||
// create the mapping
|
||||
for (j = 0; j < files.length; j++) {
|
||||
file = files[j];
|
||||
if (file in fileMap && fileMap[file].indexOf(word) === -1)
|
||||
fileMap[file].push(word);
|
||||
else
|
||||
fileMap[file] = [word];
|
||||
}
|
||||
}
|
||||
|
||||
// now check if the files don't contain excluded terms
|
||||
for (file in fileMap) {
|
||||
var valid = true;
|
||||
|
||||
// check if all requirements are matched
|
||||
var filteredTermCount = // as search terms with length < 3 are discarded: ignore
|
||||
searchterms.filter(function(term){return term.length > 2}).length
|
||||
if (
|
||||
fileMap[file].length != searchterms.length &&
|
||||
fileMap[file].length != filteredTermCount
|
||||
) continue;
|
||||
|
||||
// ensure that none of the excluded terms is in the search result
|
||||
for (i = 0; i < excluded.length; i++) {
|
||||
if (terms[excluded[i]] == file ||
|
||||
titleterms[excluded[i]] == file ||
|
||||
$u.contains(terms[excluded[i]] || [], file) ||
|
||||
$u.contains(titleterms[excluded[i]] || [], file)) {
|
||||
valid = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// if we have still a valid result we can add it to the result list
|
||||
if (valid) {
|
||||
// select one (max) score for the file.
|
||||
// for better ranking, we should calculate ranking by using words statistics like basic tf-idf...
|
||||
var score = $u.max($u.map(fileMap[file], function(w){return scoreMap[file][w]}));
|
||||
results.push([docnames[file], titles[file], '', null, score, filenames[file]]);
|
||||
}
|
||||
}
|
||||
return results;
|
||||
},
|
||||
|
||||
/**
|
||||
* helper function to return a node containing the
|
||||
* search summary for a given text. keywords is a list
|
||||
* of stemmed words, hlwords is the list of normal, unstemmed
|
||||
* words. the first one is used to find the occurrence, the
|
||||
* latter for highlighting it.
|
||||
*/
|
||||
makeSearchSummary : function(htmlText, keywords, hlwords) {
|
||||
var text = Search.htmlToText(htmlText);
|
||||
var textLower = text.toLowerCase();
|
||||
var start = 0;
|
||||
$.each(keywords, function() {
|
||||
var i = textLower.indexOf(this.toLowerCase());
|
||||
if (i > -1)
|
||||
start = i;
|
||||
});
|
||||
start = Math.max(start - 120, 0);
|
||||
var excerpt = ((start > 0) ? '...' : '') +
|
||||
$.trim(text.substr(start, 240)) +
|
||||
((start + 240 - text.length) ? '...' : '');
|
||||
var rv = $('<div class="context"></div>').text(excerpt);
|
||||
$.each(hlwords, function() {
|
||||
rv = rv.highlightText(this, 'highlighted');
|
||||
});
|
||||
return rv;
|
||||
}
|
||||
};
|
||||
|
||||
$(document).ready(function() {
|
||||
Search.init();
|
||||
});
|
52
_static/style.css
Normal file
@ -0,0 +1,52 @@
|
||||
@import url(https://fonts.googleapis.com/css?family=Roboto+Condensed&subset=cyrillic,latin);
|
||||
|
||||
body {
|
||||
background: #ebe8e1!important;
|
||||
}
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6,
|
||||
legend,
|
||||
.wy-side-nav-search > a,
|
||||
.wy-nav-top a,
|
||||
.caption-text {
|
||||
font-family: "Roboto Condensed", "Roboto Slab", sans-serif;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.wy-side-nav-search,
|
||||
.wy-nav-top {
|
||||
background-color: #207E5C;
|
||||
}
|
||||
|
||||
.wy-menu-vertical a:active {
|
||||
background-color: #1A6449;
|
||||
}
|
||||
|
||||
.wy-nav-side {
|
||||
background-color: #232323;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.wy-table-responsive table td,
|
||||
.wy-table-responsive table th {
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.wy-side-nav-search > a {
|
||||
font-size: 21px;
|
||||
}
|
||||
|
||||
.wy-nav-top {
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
.wy-menu .caption-text {
|
||||
color: #379070;
|
||||
font-size: 18px;
|
||||
text-transform: none;
|
||||
}
|
2027
_static/underscore-1.12.0.js
Normal file
6
_static/underscore.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
@ -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
@ -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
@ -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
@ -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
@ -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
@ -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
@ -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
@ -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
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>
|
344
index.html
Normal file
@ -0,0 +1,344 @@
|
||||
<!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 class="toctree-wrapper compound">
|
||||
<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><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/ru/api.html#id1">Запросы</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/ru/api.html#id5">Возможные ошибки</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/ru/authlib-injector.html">Authlib-injector</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/ru/authlib-injector.html#client">Установка в игровой клиент</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/ru/authlib-injector.html#server">Установка на сервер</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/ru/minecraft-auth.html">Авторизация для Minecraft</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/ru/minecraft-auth.html#id1">Общие положения</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/ru/minecraft-auth.html#id3">Авторизация в лаунчере</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/ru/minecraft-auth.html#id4">Авторизация на сервере</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/ru/minecraft-auth.html#id6">Одиночная игра</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/ru/minecraft-auth.html#id7">Готовые библиотеки authlib</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/ru/minecraft-auth.html#install-server">Установка authlib на сервер</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/ru/minecraft-auth.html#bungeecord">BungeeCord</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/ru/minecraft-auth.html#id15">Установка на версии ниже 1.7.2</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/ru/oauth.html">Авторизация по протоколу OAuth2</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/ru/oauth.html#id1">Регистрация приложения</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/ru/oauth.html#id3">Инициализация авторизации</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/ru/oauth.html#authorization-code-grant">Обмен кода на ключ</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/ru/oauth.html#id8">Получение информации о пользователе</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/ru/oauth.html#refresh-token-grant">Обновление токена доступа</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/ru/oauth.html#id12">Готовые библиотеки</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/ru/oauth.html#id13">Возможные ошибки</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/ru/skins-system.html">Система скинов</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/ru/skins-system.html#url">URL-адреса запросов</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/ru/skins-system.html#textures-proxy">Проксирование текстур</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/ru/skins-system.html#id13">Готовые реализации</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>
|
294
ru/_static/base-stemmer.js
Normal file
@ -0,0 +1,294 @@
|
||||
/**@constructor*/
|
||||
BaseStemmer = function() {
|
||||
this.setCurrent = function(value) {
|
||||
this.current = value;
|
||||
this.cursor = 0;
|
||||
this.limit = this.current.length;
|
||||
this.limit_backward = 0;
|
||||
this.bra = this.cursor;
|
||||
this.ket = this.limit;
|
||||
};
|
||||
|
||||
this.getCurrent = function() {
|
||||
return this.current;
|
||||
};
|
||||
|
||||
this.copy_from = function(other) {
|
||||
this.current = other.current;
|
||||
this.cursor = other.cursor;
|
||||
this.limit = other.limit;
|
||||
this.limit_backward = other.limit_backward;
|
||||
this.bra = other.bra;
|
||||
this.ket = other.ket;
|
||||
};
|
||||
|
||||
this.in_grouping = function(s, min, max) {
|
||||
if (this.cursor >= this.limit) return false;
|
||||
var ch = this.current.charCodeAt(this.cursor);
|
||||
if (ch > max || ch < min) return false;
|
||||
ch -= min;
|
||||
if ((s[ch >>> 3] & (0x1 << (ch & 0x7))) == 0) return false;
|
||||
this.cursor++;
|
||||
return true;
|
||||
};
|
||||
|
||||
this.in_grouping_b = function(s, min, max) {
|
||||
if (this.cursor <= this.limit_backward) return false;
|
||||
var ch = this.current.charCodeAt(this.cursor - 1);
|
||||
if (ch > max || ch < min) return false;
|
||||
ch -= min;
|
||||
if ((s[ch >>> 3] & (0x1 << (ch & 0x7))) == 0) return false;
|
||||
this.cursor--;
|
||||
return true;
|
||||
};
|
||||
|
||||
this.out_grouping = function(s, min, max) {
|
||||
if (this.cursor >= this.limit) return false;
|
||||
var ch = this.current.charCodeAt(this.cursor);
|
||||
if (ch > max || ch < min) {
|
||||
this.cursor++;
|
||||
return true;
|
||||
}
|
||||
ch -= min;
|
||||
if ((s[ch >>> 3] & (0X1 << (ch & 0x7))) == 0) {
|
||||
this.cursor++;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
this.out_grouping_b = function(s, min, max) {
|
||||
if (this.cursor <= this.limit_backward) return false;
|
||||
var ch = this.current.charCodeAt(this.cursor - 1);
|
||||
if (ch > max || ch < min) {
|
||||
this.cursor--;
|
||||
return true;
|
||||
}
|
||||
ch -= min;
|
||||
if ((s[ch >>> 3] & (0x1 << (ch & 0x7))) == 0) {
|
||||
this.cursor--;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
this.eq_s = function(s)
|
||||
{
|
||||
if (this.limit - this.cursor < s.length) return false;
|
||||
if (this.current.slice(this.cursor, this.cursor + s.length) != s)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
this.cursor += s.length;
|
||||
return true;
|
||||
};
|
||||
|
||||
this.eq_s_b = function(s)
|
||||
{
|
||||
if (this.cursor - this.limit_backward < s.length) return false;
|
||||
if (this.current.slice(this.cursor - s.length, this.cursor) != s)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
this.cursor -= s.length;
|
||||
return true;
|
||||
};
|
||||
|
||||
/** @return {number} */ this.find_among = function(v)
|
||||
{
|
||||
var i = 0;
|
||||
var j = v.length;
|
||||
|
||||
var c = this.cursor;
|
||||
var l = this.limit;
|
||||
|
||||
var common_i = 0;
|
||||
var common_j = 0;
|
||||
|
||||
var first_key_inspected = false;
|
||||
|
||||
while (true)
|
||||
{
|
||||
var k = i + ((j - i) >>> 1);
|
||||
var diff = 0;
|
||||
var common = common_i < common_j ? common_i : common_j; // smaller
|
||||
// w[0]: string, w[1]: substring_i, w[2]: result, w[3]: function (optional)
|
||||
var w = v[k];
|
||||
var i2;
|
||||
for (i2 = common; i2 < w[0].length; i2++)
|
||||
{
|
||||
if (c + common == l)
|
||||
{
|
||||
diff = -1;
|
||||
break;
|
||||
}
|
||||
diff = this.current.charCodeAt(c + common) - w[0].charCodeAt(i2);
|
||||
if (diff != 0) break;
|
||||
common++;
|
||||
}
|
||||
if (diff < 0)
|
||||
{
|
||||
j = k;
|
||||
common_j = common;
|
||||
}
|
||||
else
|
||||
{
|
||||
i = k;
|
||||
common_i = common;
|
||||
}
|
||||
if (j - i <= 1)
|
||||
{
|
||||
if (i > 0) break; // v->s has been inspected
|
||||
if (j == i) break; // only one item in v
|
||||
|
||||
// - but now we need to go round once more to get
|
||||
// v->s inspected. This looks messy, but is actually
|
||||
// the optimal approach.
|
||||
|
||||
if (first_key_inspected) break;
|
||||
first_key_inspected = true;
|
||||
}
|
||||
}
|
||||
do {
|
||||
var w = v[i];
|
||||
if (common_i >= w[0].length)
|
||||
{
|
||||
this.cursor = c + w[0].length;
|
||||
if (w.length < 4) return w[2];
|
||||
var res = w[3](this);
|
||||
this.cursor = c + w[0].length;
|
||||
if (res) return w[2];
|
||||
}
|
||||
i = w[1];
|
||||
} while (i >= 0);
|
||||
return 0;
|
||||
};
|
||||
|
||||
// find_among_b is for backwards processing. Same comments apply
|
||||
this.find_among_b = function(v)
|
||||
{
|
||||
var i = 0;
|
||||
var j = v.length
|
||||
|
||||
var c = this.cursor;
|
||||
var lb = this.limit_backward;
|
||||
|
||||
var common_i = 0;
|
||||
var common_j = 0;
|
||||
|
||||
var first_key_inspected = false;
|
||||
|
||||
while (true)
|
||||
{
|
||||
var k = i + ((j - i) >> 1);
|
||||
var diff = 0;
|
||||
var common = common_i < common_j ? common_i : common_j;
|
||||
var w = v[k];
|
||||
var i2;
|
||||
for (i2 = w[0].length - 1 - common; i2 >= 0; i2--)
|
||||
{
|
||||
if (c - common == lb)
|
||||
{
|
||||
diff = -1;
|
||||
break;
|
||||
}
|
||||
diff = this.current.charCodeAt(c - 1 - common) - w[0].charCodeAt(i2);
|
||||
if (diff != 0) break;
|
||||
common++;
|
||||
}
|
||||
if (diff < 0)
|
||||
{
|
||||
j = k;
|
||||
common_j = common;
|
||||
}
|
||||
else
|
||||
{
|
||||
i = k;
|
||||
common_i = common;
|
||||
}
|
||||
if (j - i <= 1)
|
||||
{
|
||||
if (i > 0) break;
|
||||
if (j == i) break;
|
||||
if (first_key_inspected) break;
|
||||
first_key_inspected = true;
|
||||
}
|
||||
}
|
||||
do {
|
||||
var w = v[i];
|
||||
if (common_i >= w[0].length)
|
||||
{
|
||||
this.cursor = c - w[0].length;
|
||||
if (w.length < 4) return w[2];
|
||||
var res = w[3](this);
|
||||
this.cursor = c - w[0].length;
|
||||
if (res) return w[2];
|
||||
}
|
||||
i = w[1];
|
||||
} while (i >= 0);
|
||||
return 0;
|
||||
};
|
||||
|
||||
/* to replace chars between c_bra and c_ket in this.current by the
|
||||
* chars in s.
|
||||
*/
|
||||
this.replace_s = function(c_bra, c_ket, s)
|
||||
{
|
||||
var adjustment = s.length - (c_ket - c_bra);
|
||||
this.current = this.current.slice(0, c_bra) + s + this.current.slice(c_ket);
|
||||
this.limit += adjustment;
|
||||
if (this.cursor >= c_ket) this.cursor += adjustment;
|
||||
else if (this.cursor > c_bra) this.cursor = c_bra;
|
||||
return adjustment;
|
||||
};
|
||||
|
||||
this.slice_check = function()
|
||||
{
|
||||
if (this.bra < 0 ||
|
||||
this.bra > this.ket ||
|
||||
this.ket > this.limit ||
|
||||
this.limit > this.current.length)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
this.slice_from = function(s)
|
||||
{
|
||||
var result = false;
|
||||
if (this.slice_check())
|
||||
{
|
||||
this.replace_s(this.bra, this.ket, s);
|
||||
result = true;
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
this.slice_del = function()
|
||||
{
|
||||
return this.slice_from("");
|
||||
};
|
||||
|
||||
this.insert = function(c_bra, c_ket, s)
|
||||
{
|
||||
var adjustment = this.replace_s(c_bra, c_ket, s);
|
||||
if (c_bra <= this.bra) this.bra += adjustment;
|
||||
if (c_bra <= this.ket) this.ket += adjustment;
|
||||
};
|
||||
|
||||
this.slice_to = function()
|
||||
{
|
||||
var result = '';
|
||||
if (this.slice_check())
|
||||
{
|
||||
result = this.current.slice(this.bra, this.ket);
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
this.assign_to = function()
|
||||
{
|
||||
return this.current.slice(0, this.limit);
|
||||
};
|
||||
};
|
12
ru/_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: 'ru',
|
||||
COLLAPSE_INDEX: false,
|
||||
BUILDER: 'html',
|
||||
FILE_SUFFIX: '.html',
|
||||
LINK_SUFFIX: '.html',
|
||||
HAS_SOURCE: true,
|
||||
SOURCELINK_SUFFIX: '.txt',
|
||||
NAVIGATION_WITH_KEYS: false
|
||||
};
|
117
ru/_static/language_data.js
Normal file
624
ru/_static/russian-stemmer.js
Normal file
@ -0,0 +1,624 @@
|
||||
// Generated by Snowball 2.1.0 - https://snowballstem.org/
|
||||
|
||||
/**@constructor*/
|
||||
RussianStemmer = function() {
|
||||
var base = new BaseStemmer();
|
||||
/** @const */ var a_0 = [
|
||||
["\u0432", -1, 1],
|
||||
["\u0438\u0432", 0, 2],
|
||||
["\u044B\u0432", 0, 2],
|
||||
["\u0432\u0448\u0438", -1, 1],
|
||||
["\u0438\u0432\u0448\u0438", 3, 2],
|
||||
["\u044B\u0432\u0448\u0438", 3, 2],
|
||||
["\u0432\u0448\u0438\u0441\u044C", -1, 1],
|
||||
["\u0438\u0432\u0448\u0438\u0441\u044C", 6, 2],
|
||||
["\u044B\u0432\u0448\u0438\u0441\u044C", 6, 2]
|
||||
];
|
||||
|
||||
/** @const */ var a_1 = [
|
||||
["\u0435\u0435", -1, 1],
|
||||
["\u0438\u0435", -1, 1],
|
||||
["\u043E\u0435", -1, 1],
|
||||
["\u044B\u0435", -1, 1],
|
||||
["\u0438\u043C\u0438", -1, 1],
|
||||
["\u044B\u043C\u0438", -1, 1],
|
||||
["\u0435\u0439", -1, 1],
|
||||
["\u0438\u0439", -1, 1],
|
||||
["\u043E\u0439", -1, 1],
|
||||
["\u044B\u0439", -1, 1],
|
||||
["\u0435\u043C", -1, 1],
|
||||
["\u0438\u043C", -1, 1],
|
||||
["\u043E\u043C", -1, 1],
|
||||
["\u044B\u043C", -1, 1],
|
||||
["\u0435\u0433\u043E", -1, 1],
|
||||
["\u043E\u0433\u043E", -1, 1],
|
||||
["\u0435\u043C\u0443", -1, 1],
|
||||
["\u043E\u043C\u0443", -1, 1],
|
||||
["\u0438\u0445", -1, 1],
|
||||
["\u044B\u0445", -1, 1],
|
||||
["\u0435\u044E", -1, 1],
|
||||
["\u043E\u044E", -1, 1],
|
||||
["\u0443\u044E", -1, 1],
|
||||
["\u044E\u044E", -1, 1],
|
||||
["\u0430\u044F", -1, 1],
|
||||
["\u044F\u044F", -1, 1]
|
||||
];
|
||||
|
||||
/** @const */ var a_2 = [
|
||||
["\u0435\u043C", -1, 1],
|
||||
["\u043D\u043D", -1, 1],
|
||||
["\u0432\u0448", -1, 1],
|
||||
["\u0438\u0432\u0448", 2, 2],
|
||||
["\u044B\u0432\u0448", 2, 2],
|
||||
["\u0449", -1, 1],
|
||||
["\u044E\u0449", 5, 1],
|
||||
["\u0443\u044E\u0449", 6, 2]
|
||||
];
|
||||
|
||||
/** @const */ var a_3 = [
|
||||
["\u0441\u044C", -1, 1],
|
||||
["\u0441\u044F", -1, 1]
|
||||
];
|
||||
|
||||
/** @const */ var a_4 = [
|
||||
["\u043B\u0430", -1, 1],
|
||||
["\u0438\u043B\u0430", 0, 2],
|
||||
["\u044B\u043B\u0430", 0, 2],
|
||||
["\u043D\u0430", -1, 1],
|
||||
["\u0435\u043D\u0430", 3, 2],
|
||||
["\u0435\u0442\u0435", -1, 1],
|
||||
["\u0438\u0442\u0435", -1, 2],
|
||||
["\u0439\u0442\u0435", -1, 1],
|
||||
["\u0435\u0439\u0442\u0435", 7, 2],
|
||||
["\u0443\u0439\u0442\u0435", 7, 2],
|
||||
["\u043B\u0438", -1, 1],
|
||||
["\u0438\u043B\u0438", 10, 2],
|
||||
["\u044B\u043B\u0438", 10, 2],
|
||||
["\u0439", -1, 1],
|
||||
["\u0435\u0439", 13, 2],
|
||||
["\u0443\u0439", 13, 2],
|
||||
["\u043B", -1, 1],
|
||||
["\u0438\u043B", 16, 2],
|
||||
["\u044B\u043B", 16, 2],
|
||||
["\u0435\u043C", -1, 1],
|
||||
["\u0438\u043C", -1, 2],
|
||||
["\u044B\u043C", -1, 2],
|
||||
["\u043D", -1, 1],
|
||||
["\u0435\u043D", 22, 2],
|
||||
["\u043B\u043E", -1, 1],
|
||||
["\u0438\u043B\u043E", 24, 2],
|
||||
["\u044B\u043B\u043E", 24, 2],
|
||||
["\u043D\u043E", -1, 1],
|
||||
["\u0435\u043D\u043E", 27, 2],
|
||||
["\u043D\u043D\u043E", 27, 1],
|
||||
["\u0435\u0442", -1, 1],
|
||||
["\u0443\u0435\u0442", 30, 2],
|
||||
["\u0438\u0442", -1, 2],
|
||||
["\u044B\u0442", -1, 2],
|
||||
["\u044E\u0442", -1, 1],
|
||||
["\u0443\u044E\u0442", 34, 2],
|
||||
["\u044F\u0442", -1, 2],
|
||||
["\u043D\u044B", -1, 1],
|
||||
["\u0435\u043D\u044B", 37, 2],
|
||||
["\u0442\u044C", -1, 1],
|
||||
["\u0438\u0442\u044C", 39, 2],
|
||||
["\u044B\u0442\u044C", 39, 2],
|
||||
["\u0435\u0448\u044C", -1, 1],
|
||||
["\u0438\u0448\u044C", -1, 2],
|
||||
["\u044E", -1, 2],
|
||||
["\u0443\u044E", 44, 2]
|
||||
];
|
||||
|
||||
/** @const */ var a_5 = [
|
||||
["\u0430", -1, 1],
|
||||
["\u0435\u0432", -1, 1],
|
||||
["\u043E\u0432", -1, 1],
|
||||
["\u0435", -1, 1],
|
||||
["\u0438\u0435", 3, 1],
|
||||
["\u044C\u0435", 3, 1],
|
||||
["\u0438", -1, 1],
|
||||
["\u0435\u0438", 6, 1],
|
||||
["\u0438\u0438", 6, 1],
|
||||
["\u0430\u043C\u0438", 6, 1],
|
||||
["\u044F\u043C\u0438", 6, 1],
|
||||
["\u0438\u044F\u043C\u0438", 10, 1],
|
||||
["\u0439", -1, 1],
|
||||
["\u0435\u0439", 12, 1],
|
||||
["\u0438\u0435\u0439", 13, 1],
|
||||
["\u0438\u0439", 12, 1],
|
||||
["\u043E\u0439", 12, 1],
|
||||
["\u0430\u043C", -1, 1],
|
||||
["\u0435\u043C", -1, 1],
|
||||
["\u0438\u0435\u043C", 18, 1],
|
||||
["\u043E\u043C", -1, 1],
|
||||
["\u044F\u043C", -1, 1],
|
||||
["\u0438\u044F\u043C", 21, 1],
|
||||
["\u043E", -1, 1],
|
||||
["\u0443", -1, 1],
|
||||
["\u0430\u0445", -1, 1],
|
||||
["\u044F\u0445", -1, 1],
|
||||
["\u0438\u044F\u0445", 26, 1],
|
||||
["\u044B", -1, 1],
|
||||
["\u044C", -1, 1],
|
||||
["\u044E", -1, 1],
|
||||
["\u0438\u044E", 30, 1],
|
||||
["\u044C\u044E", 30, 1],
|
||||
["\u044F", -1, 1],
|
||||
["\u0438\u044F", 33, 1],
|
||||
["\u044C\u044F", 33, 1]
|
||||
];
|
||||
|
||||
/** @const */ var a_6 = [
|
||||
["\u043E\u0441\u0442", -1, 1],
|
||||
["\u043E\u0441\u0442\u044C", -1, 1]
|
||||
];
|
||||
|
||||
/** @const */ var a_7 = [
|
||||
["\u0435\u0439\u0448\u0435", -1, 1],
|
||||
["\u043D", -1, 2],
|
||||
["\u0435\u0439\u0448", -1, 1],
|
||||
["\u044C", -1, 3]
|
||||
];
|
||||
|
||||
/** @const */ var /** Array<int> */ g_v = [33, 65, 8, 232];
|
||||
|
||||
var /** number */ I_p2 = 0;
|
||||
var /** number */ I_pV = 0;
|
||||
|
||||
|
||||
/** @return {boolean} */
|
||||
function r_mark_regions() {
|
||||
I_pV = base.limit;
|
||||
I_p2 = base.limit;
|
||||
var /** number */ v_1 = base.cursor;
|
||||
lab0: {
|
||||
golab1: while(true)
|
||||
{
|
||||
lab2: {
|
||||
if (!(base.in_grouping(g_v, 1072, 1103)))
|
||||
{
|
||||
break lab2;
|
||||
}
|
||||
break golab1;
|
||||
}
|
||||
if (base.cursor >= base.limit)
|
||||
{
|
||||
break lab0;
|
||||
}
|
||||
base.cursor++;
|
||||
}
|
||||
I_pV = base.cursor;
|
||||
golab3: while(true)
|
||||
{
|
||||
lab4: {
|
||||
if (!(base.out_grouping(g_v, 1072, 1103)))
|
||||
{
|
||||
break lab4;
|
||||
}
|
||||
break golab3;
|
||||
}
|
||||
if (base.cursor >= base.limit)
|
||||
{
|
||||
break lab0;
|
||||
}
|
||||
base.cursor++;
|
||||
}
|
||||
golab5: while(true)
|
||||
{
|
||||
lab6: {
|
||||
if (!(base.in_grouping(g_v, 1072, 1103)))
|
||||
{
|
||||
break lab6;
|
||||
}
|
||||
break golab5;
|
||||
}
|
||||
if (base.cursor >= base.limit)
|
||||
{
|
||||
break lab0;
|
||||
}
|
||||
base.cursor++;
|
||||
}
|
||||
golab7: while(true)
|
||||
{
|
||||
lab8: {
|
||||
if (!(base.out_grouping(g_v, 1072, 1103)))
|
||||
{
|
||||
break lab8;
|
||||
}
|
||||
break golab7;
|
||||
}
|
||||
if (base.cursor >= base.limit)
|
||||
{
|
||||
break lab0;
|
||||
}
|
||||
base.cursor++;
|
||||
}
|
||||
I_p2 = base.cursor;
|
||||
}
|
||||
base.cursor = v_1;
|
||||
return true;
|
||||
};
|
||||
|
||||
/** @return {boolean} */
|
||||
function r_R2() {
|
||||
if (!(I_p2 <= base.cursor))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
/** @return {boolean} */
|
||||
function r_perfective_gerund() {
|
||||
var /** number */ among_var;
|
||||
base.ket = base.cursor;
|
||||
among_var = base.find_among_b(a_0);
|
||||
if (among_var == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
base.bra = base.cursor;
|
||||
switch (among_var) {
|
||||
case 1:
|
||||
lab0: {
|
||||
var /** number */ v_1 = base.limit - base.cursor;
|
||||
lab1: {
|
||||
if (!(base.eq_s_b("\u0430")))
|
||||
{
|
||||
break lab1;
|
||||
}
|
||||
break lab0;
|
||||
}
|
||||
base.cursor = base.limit - v_1;
|
||||
if (!(base.eq_s_b("\u044F")))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (!base.slice_del())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (!base.slice_del())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
/** @return {boolean} */
|
||||
function r_adjective() {
|
||||
base.ket = base.cursor;
|
||||
if (base.find_among_b(a_1) == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
base.bra = base.cursor;
|
||||
if (!base.slice_del())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
/** @return {boolean} */
|
||||
function r_adjectival() {
|
||||
var /** number */ among_var;
|
||||
if (!r_adjective())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
var /** number */ v_1 = base.limit - base.cursor;
|
||||
lab0: {
|
||||
base.ket = base.cursor;
|
||||
among_var = base.find_among_b(a_2);
|
||||
if (among_var == 0)
|
||||
{
|
||||
base.cursor = base.limit - v_1;
|
||||
break lab0;
|
||||
}
|
||||
base.bra = base.cursor;
|
||||
switch (among_var) {
|
||||
case 1:
|
||||
lab1: {
|
||||
var /** number */ v_2 = base.limit - base.cursor;
|
||||
lab2: {
|
||||
if (!(base.eq_s_b("\u0430")))
|
||||
{
|
||||
break lab2;
|
||||
}
|
||||
break lab1;
|
||||
}
|
||||
base.cursor = base.limit - v_2;
|
||||
if (!(base.eq_s_b("\u044F")))
|
||||
{
|
||||
base.cursor = base.limit - v_1;
|
||||
break lab0;
|
||||
}
|
||||
}
|
||||
if (!base.slice_del())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (!base.slice_del())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
/** @return {boolean} */
|
||||
function r_reflexive() {
|
||||
base.ket = base.cursor;
|
||||
if (base.find_among_b(a_3) == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
base.bra = base.cursor;
|
||||
if (!base.slice_del())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
/** @return {boolean} */
|
||||
function r_verb() {
|
||||
var /** number */ among_var;
|
||||
base.ket = base.cursor;
|
||||
among_var = base.find_among_b(a_4);
|
||||
if (among_var == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
base.bra = base.cursor;
|
||||
switch (among_var) {
|
||||
case 1:
|
||||
lab0: {
|
||||
var /** number */ v_1 = base.limit - base.cursor;
|
||||
lab1: {
|
||||
if (!(base.eq_s_b("\u0430")))
|
||||
{
|
||||
break lab1;
|
||||
}
|
||||
break lab0;
|
||||
}
|
||||
base.cursor = base.limit - v_1;
|
||||
if (!(base.eq_s_b("\u044F")))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (!base.slice_del())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (!base.slice_del())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
/** @return {boolean} */
|
||||
function r_noun() {
|
||||
base.ket = base.cursor;
|
||||
if (base.find_among_b(a_5) == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
base.bra = base.cursor;
|
||||
if (!base.slice_del())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
/** @return {boolean} */
|
||||
function r_derivational() {
|
||||
base.ket = base.cursor;
|
||||
if (base.find_among_b(a_6) == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
base.bra = base.cursor;
|
||||
if (!r_R2())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (!base.slice_del())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
/** @return {boolean} */
|
||||
function r_tidy_up() {
|
||||
var /** number */ among_var;
|
||||
base.ket = base.cursor;
|
||||
among_var = base.find_among_b(a_7);
|
||||
if (among_var == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
base.bra = base.cursor;
|
||||
switch (among_var) {
|
||||
case 1:
|
||||
if (!base.slice_del())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
base.ket = base.cursor;
|
||||
if (!(base.eq_s_b("\u043D")))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
base.bra = base.cursor;
|
||||
if (!(base.eq_s_b("\u043D")))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (!base.slice_del())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (!(base.eq_s_b("\u043D")))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (!base.slice_del())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (!base.slice_del())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
this.stem = /** @return {boolean} */ function() {
|
||||
var /** number */ v_1 = base.cursor;
|
||||
lab0: {
|
||||
while(true)
|
||||
{
|
||||
var /** number */ v_2 = base.cursor;
|
||||
lab1: {
|
||||
golab2: while(true)
|
||||
{
|
||||
var /** number */ v_3 = base.cursor;
|
||||
lab3: {
|
||||
base.bra = base.cursor;
|
||||
if (!(base.eq_s("\u0451")))
|
||||
{
|
||||
break lab3;
|
||||
}
|
||||
base.ket = base.cursor;
|
||||
base.cursor = v_3;
|
||||
break golab2;
|
||||
}
|
||||
base.cursor = v_3;
|
||||
if (base.cursor >= base.limit)
|
||||
{
|
||||
break lab1;
|
||||
}
|
||||
base.cursor++;
|
||||
}
|
||||
if (!base.slice_from("\u0435"))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
base.cursor = v_2;
|
||||
break;
|
||||
}
|
||||
}
|
||||
base.cursor = v_1;
|
||||
r_mark_regions();
|
||||
base.limit_backward = base.cursor; base.cursor = base.limit;
|
||||
if (base.cursor < I_pV)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
var /** number */ v_6 = base.limit_backward;
|
||||
base.limit_backward = I_pV;
|
||||
var /** number */ v_7 = base.limit - base.cursor;
|
||||
lab4: {
|
||||
lab5: {
|
||||
var /** number */ v_8 = base.limit - base.cursor;
|
||||
lab6: {
|
||||
if (!r_perfective_gerund())
|
||||
{
|
||||
break lab6;
|
||||
}
|
||||
break lab5;
|
||||
}
|
||||
base.cursor = base.limit - v_8;
|
||||
var /** number */ v_9 = base.limit - base.cursor;
|
||||
lab7: {
|
||||
if (!r_reflexive())
|
||||
{
|
||||
base.cursor = base.limit - v_9;
|
||||
break lab7;
|
||||
}
|
||||
}
|
||||
lab8: {
|
||||
var /** number */ v_10 = base.limit - base.cursor;
|
||||
lab9: {
|
||||
if (!r_adjectival())
|
||||
{
|
||||
break lab9;
|
||||
}
|
||||
break lab8;
|
||||
}
|
||||
base.cursor = base.limit - v_10;
|
||||
lab10: {
|
||||
if (!r_verb())
|
||||
{
|
||||
break lab10;
|
||||
}
|
||||
break lab8;
|
||||
}
|
||||
base.cursor = base.limit - v_10;
|
||||
if (!r_noun())
|
||||
{
|
||||
break lab4;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
base.cursor = base.limit - v_7;
|
||||
var /** number */ v_11 = base.limit - base.cursor;
|
||||
lab11: {
|
||||
base.ket = base.cursor;
|
||||
if (!(base.eq_s_b("\u0438")))
|
||||
{
|
||||
base.cursor = base.limit - v_11;
|
||||
break lab11;
|
||||
}
|
||||
base.bra = base.cursor;
|
||||
if (!base.slice_del())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
var /** number */ v_12 = base.limit - base.cursor;
|
||||
r_derivational();
|
||||
base.cursor = base.limit - v_12;
|
||||
var /** number */ v_13 = base.limit - base.cursor;
|
||||
r_tidy_up();
|
||||
base.cursor = base.limit - v_13;
|
||||
base.limit_backward = v_6;
|
||||
base.cursor = base.limit_backward;
|
||||
return true;
|
||||
};
|
||||
|
||||
/**@return{string}*/
|
||||
this['stemWord'] = function(/**string*/word) {
|
||||
base.setCurrent(word);
|
||||
this.stem();
|
||||
return base.getCurrent();
|
||||
};
|
||||
};
|
63
ru/_static/translations.js
Normal file
@ -0,0 +1,63 @@
|
||||
Documentation.addTranslations({
|
||||
"locale": "ru",
|
||||
"messages": {
|
||||
"%(filename)s — %(docstitle)s": "%(filename)s — %(docstitle)s",
|
||||
"© <a href=\"%(path)s\">Copyright</a> %(copyright)s.": "© <a href=\"%(path)s\">Copyright</a> %(copyright)s.",
|
||||
"© Copyright %(copyright)s.": "© Copyright %(copyright)s.",
|
||||
", in ": ", \u0432",
|
||||
"About these documents": "\u041e\u0431 \u044d\u0442\u0438\u0445 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0445",
|
||||
"Automatically generated list of changes in version %(version)s": "\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0432 \u0432\u0435\u0440\u0441\u0438\u0438 %(version)s",
|
||||
"C API changes": "\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 API C",
|
||||
"Changes in Version %(version)s — %(docstitle)s": "\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0432\u0435\u0440\u0441\u0438\u0438 %(version)s — %(docstitle)s",
|
||||
"Collapse sidebar": "\u0421\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0431\u043e\u043a\u043e\u0432\u0443\u044e \u043f\u0430\u043d\u0435\u043b\u044c",
|
||||
"Complete Table of Contents": "\u041f\u043e\u043b\u043d\u043e\u0435 \u043e\u0433\u043b\u0430\u0432\u043b\u0435\u043d\u0438\u0435",
|
||||
"Contents": "\u0421\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435",
|
||||
"Copyright": "\u0410\u0432\u0442\u043e\u0440\u0441\u043a\u0438\u0435 \u043f\u0440\u0430\u0432\u0430",
|
||||
"Created using <a href=\"http://sphinx-doc.org/\">Sphinx</a> %(sphinx_version)s.": "\u0421\u043e\u0437\u0434\u0430\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <a href=\"http://sphinx-doc.org/\">Sphinx</a> %(sphinx_version)s.",
|
||||
"Expand sidebar": "\u0420\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0431\u043e\u043a\u043e\u0432\u0443\u044e \u043f\u0430\u043d\u0435\u043b\u044c",
|
||||
"Full index on one page": "\u041f\u043e\u043b\u043d\u044b\u0439 \u0430\u043b\u0444\u0430\u0432\u0438\u0442\u043d\u044b\u0439 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043d\u0430 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435",
|
||||
"General Index": "\u0410\u043b\u0444\u0430\u0432\u0438\u0442\u043d\u044b\u0439 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c",
|
||||
"Global Module Index": "\u0410\u043b\u0444\u0430\u0432\u0438\u0442\u043d\u044b\u0439 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043c\u043e\u0434\u0443\u043b\u0435\u0439",
|
||||
"Go": "\u0418\u0441\u043a\u0430\u0442\u044c",
|
||||
"Hide Search Matches": "\u0421\u043d\u044f\u0442\u044c \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u0435",
|
||||
"Index": "\u0410\u043b\u0444\u0430\u0432\u0438\u0442\u043d\u044b\u0439 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c",
|
||||
"Index – %(key)s": "\u0410\u043b\u0444\u0430\u0432\u0438\u0442\u043d\u044b\u0439 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c – %(key)s",
|
||||
"Index pages by letter": "\u0423\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438 \u043f\u043e \u0431\u0443\u043a\u0432\u0430\u043c \u0430\u043b\u0444\u0430\u0432\u0438\u0442\u0430",
|
||||
"Indices and tables:": "\u0422\u0430\u0431\u043b\u0438\u0446\u044b \u0438 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438:",
|
||||
"Last updated on %(last_updated)s.": "\u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u043e: %(last_updated)s.",
|
||||
"Library changes": "\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435",
|
||||
"Navigation": "\u041d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u044f",
|
||||
"Next topic": "\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0440\u0430\u0437\u0434\u0435\u043b",
|
||||
"Other changes": "\u0414\u0440\u0443\u0433\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f",
|
||||
"Overview": "\u041e\u0431\u0437\u043e\u0440",
|
||||
"Permalink to this definition": "\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u044d\u0442\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435",
|
||||
"Permalink to this headline": "\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u044d\u0442\u043e\u0442 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a",
|
||||
"Please activate JavaScript to enable the search\n functionality.": "\u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u043e\u0438\u0441\u043a\u0430 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u0435 JavaScript \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435.",
|
||||
"Preparing search...": "\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u043f\u043e\u0438\u0441\u043a\u0430\u2026",
|
||||
"Previous topic": "\u041f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0439 \u0440\u0430\u0437\u0434\u0435\u043b",
|
||||
"Quick search": "\u0411\u044b\u0441\u0442\u0440\u044b\u0439 \u043f\u043e\u0438\u0441\u043a",
|
||||
"Search": "\u041f\u043e\u0438\u0441\u043a",
|
||||
"Search Page": "\u041f\u043e\u0438\u0441\u043a",
|
||||
"Search Results": "\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043f\u043e\u0438\u0441\u043a\u0430",
|
||||
"Search finished, found %s page(s) matching the search query.": "\u041f\u043e\u0438\u0441\u043a \u0437\u0430\u0432\u0435\u0440\u0448\u0451\u043d, \u043d\u0430\u0439\u0434\u0435\u043d\u043e %s \u0441\u0442\u0440\u0430\u043d\u0438\u0446, \u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u044f\u044e\u0449\u0438\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u0443.",
|
||||
"Search within %(docstitle)s": "\u041f\u043e\u0438\u0441\u043a \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0435 \u00ab%(docstitle)s\u00bb",
|
||||
"Searching": "\u0418\u0434\u0451\u0442 \u043f\u043e\u0438\u0441\u043a",
|
||||
"Searching for multiple words only shows matches that contain\n all words.": "",
|
||||
"Show Source": "\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u0442\u0435\u043a\u0441\u0442",
|
||||
"Table of Contents": "\u041e\u0433\u043b\u0430\u0432\u043b\u0435\u043d\u0438\u0435",
|
||||
"This Page": "\u042d\u0442\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430",
|
||||
"Welcome! This is": "\u0414\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c! \u042d\u0442\u043e",
|
||||
"Your search did not match any documents. Please make sure that all words are spelled correctly and that you've selected enough categories.": "\u041f\u043e \u0432\u0430\u0448\u0435\u043c\u0443 \u043f\u043e\u0438\u0441\u043a\u0443 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u043e \u043d\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430. \u041f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435, \u0447\u0442\u043e \u0432\u0441\u0435 \u0441\u043b\u043e\u0432\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u044b \u0431\u0435\u0437 \u043e\u0448\u0438\u0431\u043e\u043a, \u0438 \u0447\u0442\u043e \u0432\u044b \u0432\u044b\u0431\u0440\u0430\u043b\u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0439.",
|
||||
"all functions, classes, terms": "\u0432\u0441\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043a\u043b\u0430\u0441\u0441\u044b, \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0438 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b",
|
||||
"can be huge": "\u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u0447\u0435\u043d\u044c \u0431\u043e\u043b\u044c\u0448\u0438\u043c",
|
||||
"last updated": "\u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435",
|
||||
"lists all sections and subsections": "\u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u0440\u0430\u0437\u0434\u0435\u043b\u043e\u0432 \u0438 \u043f\u043e\u0434\u0440\u0430\u0437\u0434\u0435\u043b\u043e\u0432",
|
||||
"next chapter": "\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u0433\u043b\u0430\u0432\u0430",
|
||||
"previous chapter": "\u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0430\u044f \u0433\u043b\u0430\u0432\u0430",
|
||||
"quick access to all modules": "\u0441\u0432\u043e\u0434\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439",
|
||||
"search": "\u0438\u0441\u043a\u0430\u0442\u044c",
|
||||
"search this documentation": "\u043f\u043e\u0438\u0441\u043a \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438",
|
||||
"the documentation for": "\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f"
|
||||
},
|
||||
"plural_expr": "(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3)"
|
||||
});
|
366
ru/api.html
Normal file
@ -0,0 +1,366 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="ru">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Ely.by API (симуляция Mojang API) — 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="/ru/_static/documentation_options.js"></script>
|
||||
<script src="/_static/jquery.js"></script>
|
||||
<script src="/_static/underscore.js"></script>
|
||||
<script src="/_static/doctools.js"></script>
|
||||
<script src="/ru/_static/translations.js"></script>
|
||||
|
||||
<script type="text/javascript" src="/_static/js/theme.js"></script>
|
||||
|
||||
|
||||
<link rel="index" title="Алфавитный указатель" href="/ru/genindex.html">
|
||||
<link rel="search" title="Поиск" href="/ru/search.html">
|
||||
<link rel="next" title="Authlib-injector" href="/ru/authlib-injector.html">
|
||||
<link rel="prev" title="Добро пожаловать в документацию Ely.by!" href="/ru/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="/ru/index.html" class="icon icon-home"> Ely.by Documentation
|
||||
|
||||
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div role="search">
|
||||
<form id="rtd-search-form" class="wy-form" action="/ru/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">Статьи на русском:</span></p>
|
||||
<ul class="current">
|
||||
<li class="toctree-l1 current"><a class="current reference internal" href="#">Ely.by API (симуляция Mojang API)</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#id1">Запросы</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#uuid">UUID по нику на время</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#id2">Никнейм по UUID + история изменений</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#id3">Список никнеймов в их UUID</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#id4">Запрос информации о профиле по UUID</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#id5">Возможные ошибки</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="/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 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>
|
||||
</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="/ru/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="/ru/index.html" class="icon icon-home"></a> »</li>
|
||||
|
||||
<li>Ely.by API (симуляция Mojang API)</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)<a class="headerlink" href="#ely-by-api-mojang-api" title="Ссылка на этот заголовок">¶</a></h1>
|
||||
<p>Здесь приведена информация об API, совместимом с функционалом <a class="reference external" href="http://wiki.vg/Mojang_API">Mojang Api</a>. Обращаем ваше внимание на то, что это не полноценное API Ely.by, а только набор дополнительных запросов, реализованных на базе нашего <a class="reference internal" href="/ru/minecraft-auth.html"><span class="doc">сервера авторизации</span></a>.</p>
|
||||
<div class="section" id="id1">
|
||||
<h2>Запросы<a class="headerlink" href="#id1" title="Ссылка на этот заголовок">¶</a></h2>
|
||||
<div class="admonition note">
|
||||
<p class="admonition-title">Примечание</p>
|
||||
<p>API не имеет ограничения на количество запросов. У нас есть просто настроенный fail2ban, который будет банить особо надоедливых клиентов. Такие дела.</p>
|
||||
</div>
|
||||
<p>В этой секции будут описаны запросы и их же варианты для Mojang API. Все запросы выполняются на базовый url <code class="docutils literal notranslate"><span class="pre">https://authserver.ely.by</span></code>.</p>
|
||||
<div class="section" id="uuid">
|
||||
<h3>UUID по нику на время<a class="headerlink" href="#uuid" title="Ссылка на этот заголовок">¶</a></h3>
|
||||
<p>Данный запрос позволяет узнать UUID пользователя по его нику на указанный момент времени. Время задаётся через GET параметр at с 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>Где <code class="docutils literal notranslate"><span class="pre">{username}</span></code> — искомый ник пользователя. Он может быть передан в любом регистре (В Mojang API только строгое совпадение).</p>
|
||||
<p>Обратите так же внимание, что параметры legacy и demo никогда не будут возвращены, т.к. эти параметры не имеют в Ely альтернативы и специфичны только для сервисов Mojang.</p>
|
||||
</dd></dl>
|
||||
|
||||
<p>В случае успешного запроса вы получите следующий ответ сервера:</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>В случае, если переданный ник не будет найден, вы получите ответ с <code class="docutils literal notranslate"><span class="pre">204</span></code> статусом и пустым телом.</p>
|
||||
</div>
|
||||
<div class="section" id="id2">
|
||||
<h3>Никнейм по UUID + история изменений<a class="headerlink" href="#id2" title="Ссылка на этот заголовок">¶</a></h3>
|
||||
<p>Данный запрос позволяет узнать все ники, использованные пользователем по его 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>Где <code class="docutils literal notranslate"><span class="pre">{uuid}</span></code> — валидный UUID. Валидным будет считаться UUID, написанный через дефисы или без них. В случае передачи невалидной строки, будет возвращён <a class="reference internal" href="#illegalargumentexception">IllegalArgumentException</a> с сообщением <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>В случае успешного запроса вы получите следующий ответ сервера:</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">Примечание</p>
|
||||
<p>Т.к. на Ely.by не реализован алгоритм запоминания момента смены ника, будет возвращаться только 1 элемент. Чуть позже мы добавим полноценную поддержку запоминания момента смены ника.</p>
|
||||
</div>
|
||||
<p>В случае, если переданный UUID не будет найден, вы получите ответ с <code class="docutils literal notranslate"><span class="pre">204</span></code> статусом и пустым телом.</p>
|
||||
</div>
|
||||
<div class="section" id="id3">
|
||||
<h3>Список никнеймов в их UUID<a class="headerlink" href="#id3" title="Ссылка на этот заголовок">¶</a></h3>
|
||||
<p>Этот запрос позволяет запросить список UUID пользователей по списку ников.</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>В теле запроса или POST параметрах необходимо передать валидный JSON массив искомых ников.</p>
|
||||
<p>В массиве должно быть не более 100 ников, в противном случае будет возвращён <a class="reference internal" href="#illegalargumentexception">IllegalArgumentException</a> с сообщением <code class="docutils literal notranslate"><span class="pre">"Not</span> <span class="pre">more</span> <span class="pre">that</span> <span class="pre">100</span> <span class="pre">profile</span> <span class="pre">name</span> <span class="pre">per</span> <span class="pre">call</span> <span class="pre">is</span> <span class="pre">allowed."</span></code>. В случае, если переданная строка окажется невалидным JSON объектом, будет возвращено это же исключение, только с текстом <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>Пример тела запроса:</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>В случае успешного запроса вы получите следующий ответ сервера:</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>Данные возвращаются в том же порядке, в каком и были запрошены.</p>
|
||||
<p>В случае, если один из переданных никнеймов не найден в базе данных, для него не будет возвращено значения (он будет просто пропущен). Учитывайте эту ситуацию при парсинге ответа.</p>
|
||||
</div>
|
||||
<div class="section" id="id4">
|
||||
<h3>Запрос информации о профиле по UUID<a class="headerlink" href="#id4" title="Ссылка на этот заголовок">¶</a></h3>
|
||||
<p>См. <a class="reference internal" href="/ru/minecraft-auth.html#profile-request"><span class="std std-ref">запрос профиля для сервера авторизации</span></a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="id5">
|
||||
<h2>Возможные ошибки<a class="headerlink" href="#id5" title="Ссылка на этот заголовок">¶</a></h2>
|
||||
<div class="section" id="illegalargumentexception">
|
||||
<span id="id6"></span><h3>IllegalArgumentException<a class="headerlink" href="#illegalargumentexception" title="Ссылка на этот заголовок">¶</a></h3>
|
||||
<p>Данная ошибка возникает при попытке передать на сервер данные в неправильном формате.</p>
|
||||
<p>Пример подобной ошибки:</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><code class="docutils literal notranslate"><span class="pre">errorMessage</span></code> не всегда совпадает с таковым у Mojang, но в основном это касается только специфичных только для Ely ошибок. Оригинальные же запросы и ожидаемые от них ошибки повторяют тексты Mojang.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<footer>
|
||||
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
|
||||
<a href="/ru/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="/ru/index.html" class="btn btn-neutral float-left" title="Добро пожаловать в документацию Ely.by!" 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>
|
326
ru/authlib-injector.html
Normal file
@ -0,0 +1,326 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="ru">
|
||||
<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="/ru/_static/documentation_options.js"></script>
|
||||
<script src="/_static/jquery.js"></script>
|
||||
<script src="/_static/underscore.js"></script>
|
||||
<script src="/_static/doctools.js"></script>
|
||||
<script src="/ru/_static/translations.js"></script>
|
||||
|
||||
<script type="text/javascript" src="/_static/js/theme.js"></script>
|
||||
|
||||
|
||||
<link rel="index" title="Алфавитный указатель" href="/ru/genindex.html">
|
||||
<link rel="search" title="Поиск" href="/ru/search.html">
|
||||
<link rel="next" title="Авторизация для Minecraft" href="/ru/minecraft-auth.html">
|
||||
<link rel="prev" title="Ely.by API (симуляция Mojang API)" href="/ru/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="/ru/index.html" class="icon icon-home"> Ely.by Documentation
|
||||
|
||||
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div role="search">
|
||||
<form id="rtd-search-form" class="wy-form" action="/ru/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">Статьи на русском:</span></p>
|
||||
<ul class="current">
|
||||
<li class="toctree-l1"><a class="reference internal" href="/ru/api.html">Ely.by API (симуляция Mojang API)</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">Установка в игровой клиент</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#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="/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 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>
|
||||
</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="/ru/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="/ru/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="Ссылка на этот заголовок">¶</a></h1>
|
||||
<p><strong>authlib-injector</strong> — это библиотека, позволяющая подменить адреса серверов авторизации и сессии в Authlib, не модифицируя непосредственно саму библиотеку. Выполнена как javaagent.</p>
|
||||
<p>Данная библиотека значительно упрощает установку альтернативных сервисов авторизации в игровой клиент и сервер, поскольку она универсально применяет трансформацию в процессе работы программы.</p>
|
||||
<p>Скачать последнюю версию можно со <a class="reference external" href="https://github.com/yushijinhun/authlib-injector/releases/latest">страницы релизов на GitHub</a>.</p>
|
||||
<p>Здесь приведена документация к ключевым аспектам установки и использования библиотеки. Для более подробной информации обратитесь к <a class="reference external" href="https://github.com/yushijinhun/authlib-injector/wiki">оригинальной документации на китайском языке</a>.</p>
|
||||
<div class="section" id="client">
|
||||
<span id="id2"></span><h2>Установка в игровой клиент<a class="headerlink" href="#client" title="Ссылка на этот заголовок">¶</a></h2>
|
||||
<div class="admonition attention">
|
||||
<p class="admonition-title">Внимание</p>
|
||||
<p>Обратите внимание, что этот раздел описывает установку authlib-injector в игру. Игровой лаунчер по-прежнему должен самостоятельно реализовать процесс авторизации, чтобы после передать <code class="docutils literal notranslate"><span class="pre">accessToken</span></code> в игру.</p>
|
||||
</div>
|
||||
<p>Для применения библиотеки, необходимо указать её в качестве javaagent для игры. Сделать это можно, добавив в начало команды запуска игры строку <code class="docutils literal notranslate"><span class="pre">-javaagent:/путь/до/файла/authlib-injector.jar=ely.by</span></code>. В результате изменений строка запуска игры должна выглядеть следующим образом:</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>Если вы запускаете игру через лаунчер, то в его настройках необходимо найти поле для указания дополнительных аргументов JVM, куда необходимо в самое начало вставить строку, приведённую выше.</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>Установка на сервер<a class="headerlink" href="#server" title="Ссылка на этот заголовок">¶</a></h2>
|
||||
<p>Также как и в случае с игровым клиентом, библиотеку необходимо указать в качестве javaagent. <a class="reference external" href="https://github.com/yushijinhun/authlib-injector/releases/latest">Скачайте библиотеку</a> и поместите её в директорию с сервером. После этого добавьте вызов javaagent в команду запуска сервера:</p>
|
||||
<div class="line-block">
|
||||
<div class="line">До: <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">После: <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>При запуске сервера вы должны увидеть сообщение об активации 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="Ссылка на этот заголовок">¶</a></h3>
|
||||
<p>authlib-injector должен быть установлен непосредственно на сам BungeeCord, а также <strong>на все сервера</strong> позади него. Обратите внимание на конфигурацию параметра online‑mode:</p>
|
||||
<ul class="simple">
|
||||
<li><p>В конфигурации BungeeCord (<code class="docutils literal notranslate"><span class="pre">config.yml</span></code>) должно стоять значение <code class="docutils literal notranslate"><span class="pre">online_mode=true</span></code>.</p></li>
|
||||
<li><p>В конфигурации всех серверов позади прокси (<code class="docutils literal notranslate"><span class="pre">server.properties</span></code>) должно быть указано значение <code class="docutils literal notranslate"><span class="pre">online-mode=false</span></code>.</p></li>
|
||||
</ul>
|
||||
<p>Благодаря такой конфигурации установки, авторизация будет работать для всех входящих игроков, а на внутренних серверах будут корректно отображаться скины игроков.</p>
|
||||
</div>
|
||||
<div class="section" id="launchhelper">
|
||||
<h3>LaunchHelper<a class="headerlink" href="#launchhelper" title="Ссылка на этот заголовок">¶</a></h3>
|
||||
<p>Не все игровые хостинги позволяют напрямую модифицировать аргументы, с которыми запускается сервер. Чтобы обойти это ограничение, можно использовать специальный сервер, который запускает игровой сервер, подмешивая туда authlib-injector. Для установки следуйте инструкции:</p>
|
||||
<ol class="arabic">
|
||||
<li><p>Скачайте версию LaunchHelper для вашей операционной системы со <a class="reference external" href="https://github.com/Codex-in-somnio/LaunchHelper/releases/latest">страницы загрузок</a>.</p></li>
|
||||
<li><p>Загрузите скачанный файл и файл <code class="docutils literal notranslate"><span class="pre">authlib-injector.jar</span></code> в папку сервера на вашем хостинге.</p></li>
|
||||
<li><p>Там же создайте файл <code class="docutils literal notranslate"><span class="pre">launchhelper.properties</span></code> и поместите в него следующее содержимое:</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>Где <code class="docutils literal notranslate"><span class="pre">javaAgentJarPath</span></code> содержит путь до файла authlib-injector.jar, а <code class="docutils literal notranslate"><span class="pre">execJarPath</span></code> содержит имя файла сервера.</p>
|
||||
</li>
|
||||
<li><p>В панели управления хостингом укажите <code class="docutils literal notranslate"><span class="pre">LaunchHelper.jar</span></code> в качестве запускаемого файла сервера.</p>
|
||||
<p>Если возможности указать исполнимый файл явно нет, то следует переименовать файл <code class="docutils literal notranslate"><span class="pre">LaunchHelper.jar</span></code> в соответствие с требованиями вашего хостинга (обычно, это <code class="docutils literal notranslate"><span class="pre">server.jar</span></code>). В этом случае у вас должна получиться следующая структура файлов:</p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="docutils literal notranslate"><span class="pre">server.jar</span></code> - файл LaunchHelper.</p></li>
|
||||
<li><p><code class="docutils literal notranslate"><span class="pre">minecraft_server.jar</span></code> - предпочитаемое ядро сервера.</p></li>
|
||||
<li><p><code class="docutils literal notranslate"><span class="pre">authlib-injector.jar</span></code> - файл authlib-injector.</p></li>
|
||||
<li><p><code class="docutils literal notranslate"><span class="pre">launchhelper.properties</span></code> - файл конфигурации для 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="/ru/minecraft-auth.html" class="btn btn-neutral float-right" title="Авторизация для Minecraft" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
|
||||
<a href="/ru/api.html" class="btn btn-neutral float-left" title="Ely.by API (симуляция Mojang API)" 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>
|
254
ru/genindex.html
Normal file
@ -0,0 +1,254 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="ru">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Алфавитный указатель — 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="/ru/_static/documentation_options.js"></script>
|
||||
<script src="/_static/jquery.js"></script>
|
||||
<script src="/_static/underscore.js"></script>
|
||||
<script src="/_static/doctools.js"></script>
|
||||
<script src="/ru/_static/translations.js"></script>
|
||||
|
||||
<script type="text/javascript" src="/_static/js/theme.js"></script>
|
||||
|
||||
|
||||
<link rel="index" title="Алфавитный указатель" href="#">
|
||||
<link rel="search" title="Поиск" href="/ru/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="/ru/index.html" class="icon icon-home"> Ely.by Documentation
|
||||
|
||||
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div role="search">
|
||||
<form id="rtd-search-form" class="wy-form" action="/ru/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">Статьи на русском:</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 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>
|
||||
</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="/ru/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="/ru/index.html" class="icon icon-home"></a> »</li>
|
||||
|
||||
<li>Алфавитный указатель</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">Алфавитный указатель</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>
|
293
ru/index.html
Normal file
@ -0,0 +1,293 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="ru">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Добро пожаловать в документацию Ely.by! — 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="/ru/_static/documentation_options.js"></script>
|
||||
<script src="/_static/jquery.js"></script>
|
||||
<script src="/_static/underscore.js"></script>
|
||||
<script src="/_static/doctools.js"></script>
|
||||
<script src="/ru/_static/translations.js"></script>
|
||||
|
||||
<script type="text/javascript" src="/_static/js/theme.js"></script>
|
||||
|
||||
|
||||
<link rel="index" title="Алфавитный указатель" href="/ru/genindex.html">
|
||||
<link rel="search" title="Поиск" href="/ru/search.html">
|
||||
<link rel="next" title="Ely.by API (симуляция Mojang API)" href="/ru/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="/ru/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">Статьи на русском:</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 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>
|
||||
</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>Добро пожаловать в документацию Ely.by!</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>Добро пожаловать в документацию Ely.by!<a class="headerlink" href="#ely-by" title="Ссылка на этот заголовок">¶</a></h1>
|
||||
<p>В этой документации вы найдёте информацию о публичных сервисах проекта Ely.by, используя которые вы сможете самостоятельно реализовать свои программные продукты для совместной работы с сервисом Ely.by.</p>
|
||||
<p>Вы можете свободно улучшать и вносить предложения по изменениям в документацию в <a class="reference external" href="https://github.com/elyby/docs">репозитории проекта</a>.</p>
|
||||
<div class="toctree-wrapper compound">
|
||||
<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><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/ru/api.html#id1">Запросы</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/ru/api.html#id5">Возможные ошибки</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/ru/authlib-injector.html">Authlib-injector</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/ru/authlib-injector.html#client">Установка в игровой клиент</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/ru/authlib-injector.html#server">Установка на сервер</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/ru/minecraft-auth.html">Авторизация для Minecraft</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/ru/minecraft-auth.html#id1">Общие положения</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/ru/minecraft-auth.html#id3">Авторизация в лаунчере</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/ru/minecraft-auth.html#id4">Авторизация на сервере</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/ru/minecraft-auth.html#id6">Одиночная игра</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/ru/minecraft-auth.html#id7">Готовые библиотеки authlib</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/ru/minecraft-auth.html#install-server">Установка authlib на сервер</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/ru/minecraft-auth.html#bungeecord">BungeeCord</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/ru/minecraft-auth.html#id15">Установка на версии ниже 1.7.2</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/ru/oauth.html">Авторизация по протоколу OAuth2</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/ru/oauth.html#id1">Регистрация приложения</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/ru/oauth.html#id3">Инициализация авторизации</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/ru/oauth.html#authorization-code-grant">Обмен кода на ключ</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/ru/oauth.html#id8">Получение информации о пользователе</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/ru/oauth.html#refresh-token-grant">Обновление токена доступа</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/ru/oauth.html#id12">Готовые библиотеки</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/ru/oauth.html#id13">Возможные ошибки</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/ru/skins-system.html">Система скинов</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/ru/skins-system.html#url">URL-адреса запросов</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/ru/skins-system.html#textures-proxy">Проксирование текстур</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/ru/skins-system.html#id13">Готовые реализации</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<footer>
|
||||
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
|
||||
<a href="/ru/api.html" class="btn btn-neutral float-right" title="Ely.by API (симуляция Mojang API)" 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>
|
662
ru/minecraft-auth.html
Normal file
@ -0,0 +1,662 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="ru">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Авторизация для 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="/ru/_static/documentation_options.js"></script>
|
||||
<script src="/_static/jquery.js"></script>
|
||||
<script src="/_static/underscore.js"></script>
|
||||
<script src="/_static/doctools.js"></script>
|
||||
<script src="/ru/_static/translations.js"></script>
|
||||
|
||||
<script type="text/javascript" src="/_static/js/theme.js"></script>
|
||||
|
||||
|
||||
<link rel="index" title="Алфавитный указатель" href="/ru/genindex.html">
|
||||
<link rel="search" title="Поиск" href="/ru/search.html">
|
||||
<link rel="next" title="Авторизация по протоколу OAuth2" href="/ru/oauth.html">
|
||||
<link rel="prev" title="Authlib-injector" href="/ru/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="/ru/index.html" class="icon icon-home"> Ely.by Documentation
|
||||
|
||||
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div role="search">
|
||||
<form id="rtd-search-form" class="wy-form" action="/ru/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">Статьи на русском:</span></p>
|
||||
<ul class="current">
|
||||
<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 current"><a class="current reference internal" href="#">Авторизация для Minecraft</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#id1">Общие положения</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#id2">Предусмотренные ошибки</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#id3">Авторизация в лаунчере</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#id4">Авторизация на сервере</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#authlib">Через authlib</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#id5">Для старых версий</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#id6">Одиночная игра</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#id7">Готовые библиотеки authlib</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#install-server">Установка authlib на сервер</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#vanilla">Оригинальный сервер</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">Установка на версии ниже 1.7.2</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#id16">Пример установки</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</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 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>
|
||||
</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="/ru/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="/ru/index.html" class="icon icon-home"></a> »</li>
|
||||
|
||||
<li>Авторизация для 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>Авторизация для Minecraft<a class="headerlink" href="#minecraft" title="Ссылка на этот заголовок">¶</a></h1>
|
||||
<p>Здесь приведена информация по авторизации для лаунчеров и серверов Minecraft через сервис авторизации Ely.by.</p>
|
||||
<p>Протокол авторизации реализован максимально похожим на <a class="reference external" href="http://wiki.vg/Authentication">оригинальный протокол авторизации Mojang</a>, но тем не менее эта документация описывает все доступные функции конкретно сервиса авторизации Ely.by.</p>
|
||||
<div class="section" id="id1">
|
||||
<h2>Общие положения<a class="headerlink" href="#id1" title="Ссылка на этот заголовок">¶</a></h2>
|
||||
<ul>
|
||||
<li><p>Все запросы должны выполняться на URL <strong>https://authserver.ely.by</strong>.</p></li>
|
||||
<li><p>При успешном запросе, сервер вернёт ответ со статусом 200. Любой другой код свидетельствует об ошибке.</p></li>
|
||||
<li><p>Сервер всегда отвечает JSON данными, кроме случаев системных ошибок и ответов на legacy запросы. Учитывайте это для отображения пользователю правильного сообщения об ошибке.</p></li>
|
||||
<li><p>В случае стандартной ошибки, вы получите следующие данные:</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>Предусмотренные ошибки<a class="headerlink" href="#id2" title="Ссылка на этот заголовок">¶</a></h3>
|
||||
<p>В отличие от оригинального протокола, на 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>Причина</p></th>
|
||||
<th class="head"><p>Решение</p></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="row-even"><td><p>IllegalArgumentException</p></td>
|
||||
<td><p>Вы передали неполный список данных для выполнения запроса.</p></td>
|
||||
<td><p>Внимательно перепроверьте что вы шлёте в запросе и что указано в документации.</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p>ForbiddenOperationException</p></td>
|
||||
<td><p>Пользователь ввёл/разработчик передал неверные значения.</p></td>
|
||||
<td><p>Необходимо вывести пользователю уведомление о неправильно введённых данных.</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>Для индикации ошибки Not Found используется ответ с 404 статусом.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="id3">
|
||||
<h2>Авторизация в лаунчере<a class="headerlink" href="#id3" title="Ссылка на этот заголовок">¶</a></h2>
|
||||
<p>В этом разделе описана авторизация для игрового лаунчера и описывает действия, необходимые для получения <code class="docutils literal notranslate"><span class="pre">accessToken</span></code> для игрового клиента Minecraft. В результате авторизации будет получен JWT-токен с <a class="reference internal" href="/ru/oauth.html#available-scopes"><span class="std std-ref">правами доступа</span></a> <code class="docutils literal notranslate"><span class="pre">minecraft_server_session</span></code>.</p>
|
||||
<div class="admonition attention">
|
||||
<p class="admonition-title">Внимание</p>
|
||||
<p>Мы рекомендуем использовать <a class="reference internal" href="/ru/oauth.html"><span class="doc">протокол авторизации OAuth 2.0</span></a> с запросом <a class="reference internal" href="/ru/oauth.html#available-scopes"><span class="std std-ref">прав доступа</span></a> <code class="docutils literal notranslate"><span class="pre">minecraft_server_session</span></code>, как более безопасный и удобный для пользователя метод.</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>Непосредственная авторизация пользователя, используя его логин (ник или E‑mail), пароль и токен двухфакторной аутентификации.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Параметры</dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>username</strong> (<em>string</em>) – Никнейм пользователя или его E‑mail (более предпочтительно).</p></li>
|
||||
<li><p><strong>password</strong> (<em>string</em>) – Пароль пользователя или комбинация <code class="docutils literal notranslate"><span class="pre">пароль:токен</span></code>.</p></li>
|
||||
<li><p><strong>clientToken</strong> (<em>string</em>) – Уникальный токен лаунчера пользователя.</p></li>
|
||||
<li><p><strong>requestUser</strong> (<em>bool</em>) – Если поле передано как <code class="docutils literal notranslate"><span class="pre">true</span></code>, то в ответе сервера будет присутствовать поле <code class="docutils literal notranslate"><span class="pre">user</span></code>.</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<p>Система аккаунтов Ely.by поддерживает защиту пользователей посредством двухфакторной аутентификации. В оригинальном протоколе авторизации Mojang не предусмотрено возможности для передачи TOTP-токенов. Для решения этой проблемы и сохранения совместимости с реализацией сервера <a class="reference external" href="https://minecraft.gamepedia.com/Yggdrasil">Yggdrasil</a>, мы предлагаем передавать токен в поле <code class="docutils literal notranslate"><span class="pre">password</span></code> в формате <code class="docutils literal notranslate"><span class="pre">пароль:токен</span></code>.</p>
|
||||
<p>К сожалению, не все пользователи осведомлены об этой возможности, поэтому будет лучше при получении ошибки о защищённости аккаунта пользователя двухфакторной аутентификацией явно запросить у него токен и склеить его программно.</p>
|
||||
<p>Логика следующая:</p>
|
||||
<ol class="arabic">
|
||||
<li><p>Если пользователь указал верные логин и пароль, но для его аккаунта включена двухфакторная аутентификация, вы получите ответ с <code class="docutils literal notranslate"><span class="pre">401</span></code> статусом и следующим содержимым:</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>При получении этой ошибки, необходимо запросить у пользователя ввод TOTP‑токена, после чего повторить запрос на авторизацию с теми же учётными данными, добавив к паролю постфикс в виде <code class="docutils literal notranslate"><span class="pre">:токен</span></code>, где <code class="docutils literal notranslate"><span class="pre">токен</span></code> — это значение, введённое пользователем.</p>
|
||||
<p>Если пароль пользователя был «password123», а токен «123456», то после склейки поле <code class="docutils literal notranslate"><span class="pre">password</span></code> примет значение «password123:123456».</p>
|
||||
</li>
|
||||
<li><p>Если в результате этих действий вы получите ответ с <code class="docutils literal notranslate"><span class="pre">401</span></code> статутом и <code class="docutils literal notranslate"><span class="pre">errorMessage</span></code> «Invalid credentials. Invalid email or password.», то это будет свидетельствовать о том, что переданный токен неверен и его нужно перезапросить у пользователя.</p></li>
|
||||
</ol>
|
||||
<p>Если все данные будут переданы верно, вы получите следующий ответ:</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>Обновляет валидный <code class="docutils literal notranslate"><span class="pre">accessToken</span></code>. Этот запрос позволяет не хранить на клиенте его пароль, а оперировать только сохранённым значением <code class="docutils literal notranslate"><span class="pre">accessToken</span></code> для практически бесконечной возможности проходить авторизацию.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Параметры</dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>accessToken</strong> (<em>string</em>) – Уникальный ключ, полученный после авторизации.</p></li>
|
||||
<li><p><strong>clientToken</strong> (<em>string</em>) – Уникальный идентификатор клиента, относительно которого получен accessToken.</p></li>
|
||||
<li><p><strong>requestUser</strong> (<em>bool</em>) – Если поле передано как <code class="docutils literal notranslate"><span class="pre">true</span></code>, то в ответе сервера будет присутствовать поле <code class="docutils literal notranslate"><span class="pre">user</span></code>.</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<div class="admonition note">
|
||||
<p class="admonition-title">Примечание</p>
|
||||
<p>В оригинальном протоколе так же передаётся значение <code class="docutils literal notranslate"><span class="pre">selectedProfile</span></code>, но в реализации Mojang он не влияет ни на что. Наша реализация сервера авторизации игнорирует этот параметр и опирается на значения <code class="docutils literal notranslate"><span class="pre">accessToken</span></code> и <code class="docutils literal notranslate"><span class="pre">clientToken</span></code>.</p>
|
||||
</div>
|
||||
<p>В случае получения какой-либо предусмотренной ошибки, следует заново запросить пароль пользователя и произвести обычную авторизацию.</p>
|
||||
<p>Успешный ответ:</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>Этот запрос позволяет проверить валиден ли указанный accessToken или нет. Этот запрос не обновляет токен и его время жизни, а только позволяет удостовериться, что он ещё действительный.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Параметры</dt>
|
||||
<dd class="field-odd"><p><strong>accessToken</strong> (<em>string</em>) – Токен доступа, полученный после авторизации.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<p>Успешным ответом будет являться пустое тело. При ошибке будет получен <strong>400</strong> или <strong>401</strong> статус. Пример ответа сервера при отправке истёкшего токена:</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>Этот запрос позволяет выполнить инвалидацию всех выданных пользователю токенов.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Параметры</dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>username</strong> (<em>string</em>) – Никнейм пользователя или его E-mail (более предпочтительно).</p></li>
|
||||
<li><p><strong>password</strong> (<em>string</em>) – Пароль пользователя.</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<p>Успешным ответом будет являться пустое тело. Ориентируйтесь на поле <strong>error</strong> в теле ответа.</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>Запрос позволяет инвалидировать accessToken. В случае, если переданный токен не удастся найти в хранилище токенов, ошибка не будет сгенерирована и вы получите успешный ответ.</p>
|
||||
<p>Входные параметры:</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Параметры</dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>accessToken</strong> (<em>string</em>) – Уникальный ключ, полученный после авторизации.</p></li>
|
||||
<li><p><strong>clientToken</strong> (<em>string</em>) – Уникальный идентификатор клиента, относительно которого получен accessToken.</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<p>Успешным ответом будет являться пустое тело. Ориентируйтесь на поле <strong>error</strong> в теле ответа.</p>
|
||||
</dd></dl>
|
||||
|
||||
</div>
|
||||
<div class="section" id="id4">
|
||||
<h2>Авторизация на сервере<a class="headerlink" href="#id4" title="Ссылка на этот заголовок">¶</a></h2>
|
||||
<p>Эти запросы выполняются непосредственно клиентом и сервером при помощи внутреннего кода или библиотеки authlib (начиная с версии 1.7.2). Они актуальны только в том случае, если вы уже произвели авторизацию и запустили игру с валидным accessToken. Вам остаётся только заменить пути внутри игры/библиотеки на приведённые ниже пути.</p>
|
||||
<p>Поскольку непосредственно изменить что-либо в работе authlib или игры вы не можете, здесь не приводятся передаваемые значения и ответы сервера. При необходимости вы сможете найти эту информацию самостоятельно в интернете.</p>
|
||||
<div class="section" id="authlib">
|
||||
<h3>Через authlib<a class="headerlink" href="#authlib" title="Ссылка на этот заголовок">¶</a></h3>
|
||||
<div class="admonition important">
|
||||
<p class="admonition-title">Важно</p>
|
||||
<p>Эта часть документации описывает запросы, выполняемые через authlib в версии игры 1.7.2+. Для более старых версий смотрите раздел ниже.</p>
|
||||
</div>
|
||||
<p>Все запросы из этой категории выполняются на подуровень /session. Перед каждым из запросов указан тип отправляемого запроса.</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>Запрос на этот URL производится клиентом в момент подключения к серверу с 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>Запрос на этот URL выполняет сервер с online-mode=true после того, как клиент, пытающийся к нему подключиться, успешно выполнит join запрос. Текстуры будут подписаны ключом Ely.by.</p>
|
||||
<p>Ключ для проверки подписи можно получить через <a class="reference internal" href="/ru/skins-system.html#signature-verification-key-request"><span class="std std-ref">сервер системы скинов</span></a>.</p>
|
||||
<div class="admonition attention">
|
||||
<p class="admonition-title">Внимание</p>
|
||||
<p>В редких случаях поле <code class="docutils literal notranslate"><span class="pre">signature</span></code> будет иметь значение <code class="docutils literal notranslate"><span class="pre">Cg==</span></code>. При таком значении поля подписи проводить её проверку не нужно, т.к. она всегда будет некорректной.</p>
|
||||
</div>
|
||||
</dd></dl>
|
||||
|
||||
</div>
|
||||
<div class="section" id="id5">
|
||||
<h3>Для старых версий<a class="headerlink" href="#id5" title="Ссылка на этот заголовок">¶</a></h3>
|
||||
<div class="admonition important">
|
||||
<p class="admonition-title">Важно</p>
|
||||
<p>Эта часть документации описывает запросы, выполняемые более старыми версиями Minecraft, в которых не применялась библиотека Authlib. Это все версии ниже 1.7.2.</p>
|
||||
</div>
|
||||
<p>Все запросы из этой категории выполняются на подуровень /session/legacy. Перед каждым из запросов указан тип отправляемого запроса.</p>
|
||||
<p>Принцип обработки этих запросов такой же, как и для authlib, отличие только во входных параметрах и возвращаемых значения.</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>Запрос на этот URL производится клиентом в момент подключения к серверу с 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>Запрос на этот URL выполняет сервер с online-mode=true после того, как клиент, пытающийся к нему подключится, успешно выполнит join запрос.</p>
|
||||
</dd></dl>
|
||||
|
||||
<p>Важно не потерять GET параметр <strong>?user=</strong> в конце обоих запросов, чтобы получились следующие URL: <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>Одиночная игра<a class="headerlink" href="#id6" title="Ссылка на этот заголовок">¶</a></h2>
|
||||
<p>По сути, одиночная игра - это локальный сервер, созданный для одного игрока. По крайней мере это так, начиная с версии 1.6, в которой и был представлен механизм локальных серверов.</p>
|
||||
<p>Тем не менее, описанный ниже запрос актуален только для Minecraft 1.7.6+, когда для загрузки скинов стала использоваться так же Authlib.</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>Запрос на этот URL выполняется клиентом в одиночной игре на локальном сервере (созданном посредством самой игры). В URL передаётся UUID пользователя, с которым был запущен клиент, а в ответ получается информация о текстурах игрока в таком же формате, как и при hasJoined запросе.</p>
|
||||
</dd></dl>
|
||||
|
||||
</div>
|
||||
<div class="section" id="id7">
|
||||
<h2>Готовые библиотеки authlib<a class="headerlink" href="#id7" title="Ссылка на этот заголовок">¶</a></h2>
|
||||
<div class="admonition attention">
|
||||
<p class="admonition-title">Внимание</p>
|
||||
<p>Ely.by поддерживает библиотеку authlib-injector. Это наиболее простой и универсальный способ установки системы авторизации в игру и игровые сервера. За подробностями обратитесь в <a class="reference internal" href="/ru/authlib-injector.html"><span class="doc">соответствующий раздел документации</span></a>.</p>
|
||||
</div>
|
||||
<p>Поскольку самостоятельная реализация связана с трудностями поиска исходников, подключения зависимостей и в конце-концов с процессом компиляции, на <a class="reference external" href="https://ely.by/load">странице загрузок нашей системы скинов</a> вы можете загрузить уже готовые библиотеки со всеми необходимыми изменениями. Выберите в выпадающем списке необходимую версию и следуйте инструкции по установке, размещённой на той же странице ниже.</p>
|
||||
<p>В более ранних версиях игры система скинов находилась внутри игрового клиента, так что библиотеки ниже обеспечивают лишь авторизацию:</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>Для установки вам необходимо заменить оригинальную библиотеку, располагающуюся по пути <code class="docutils literal notranslate"><span class="pre"><директория</span> <span class="pre">установки</span> <span class="pre">minecraft>/libraries/com/mojang/authlib/</span></code>. Убедитесь в том, что версии скачанного и заменяемого файлов совпадают.</p>
|
||||
</div>
|
||||
<div class="section" id="install-server">
|
||||
<span id="id9"></span><h2>Установка authlib на сервер<a class="headerlink" href="#install-server" title="Ссылка на этот заголовок">¶</a></h2>
|
||||
<p>Сервер также использует authlib для выполнения авторизации игрока, поэтому соответствующие изменения должны быть также применены и к нему. Ниже приведены инструкции по установки authlib для различных реализаций сервера Minecraft.</p>
|
||||
<div class="admonition note">
|
||||
<p class="admonition-title">Примечание</p>
|
||||
<p>Если ни одна из приведённых ниже инструкций не подошла для вашей реализации сервера, пожалуйста, создайте <a class="reference external" href="https://github.com/elyby/docs/issues/new">новый issue</a> и мы допишем инструкцию для вашего сервера.</p>
|
||||
</div>
|
||||
<div class="section" id="vanilla">
|
||||
<span id="id10"></span><h3>Оригинальный сервер<a class="headerlink" href="#vanilla" title="Ссылка на этот заголовок">¶</a></h3>
|
||||
<p>С помощью архиватора откройте файл сервера <code class="docutils literal notranslate"><span class="pre">minecraft_server.ВЕРСИЯ.jar</span></code>. Таким же образом откройте архив с authlib для соответствующей версии сервера. Перед вами будет два окна: одно с файлами сервера, другое с файлами authlib. Вам необходимо «перетащить» из архива с authlib все файлы и папки, <strong>за исключением директории META-INF</strong>, и подтвердить замену.</p>
|
||||
<div class="figure align-center" id="id17">
|
||||
<img alt="Процесс установки Authlib" src="/_images/authlib-install.png">
|
||||
<p class="caption"><span class="caption-text">Обратите внимание: «перетягивать» содержимое нужно ниже папок сервера (в область файлов .class).</span><a class="headerlink" href="#id17" title="Постоянная ссылка на рисунок">¶</a></p>
|
||||
</div>
|
||||
<p>После этих действий вы можете закрыть оба окна и в файле <code class="docutils literal notranslate"><span class="pre">server.properties</span></code> установить значение <code class="docutils literal notranslate"><span class="pre">online-mode=true</span></code>.</p>
|
||||
</div>
|
||||
<div class="section" id="bukkit-spigot">
|
||||
<h3>Bukkit/Spigot<a class="headerlink" href="#bukkit-spigot" title="Ссылка на этот заголовок">¶</a></h3>
|
||||
<p>Сперва выполните установку, как она описана для <a class="reference external" href="#vanilla">оригинального сервера</a>. Затем скачайте библиотеки <a class="reference external" href="https://repo1.maven.org/maven2/commons-io/commons-io/2.5/commons-io-2.5.jar">commons-io</a> и <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>, после чего аналогичным с authlib образом последовательно переместите содержимое скачанных архивов в файлы сервера.</p>
|
||||
</div>
|
||||
<div class="section" id="forge-sponge">
|
||||
<h3>Forge/Sponge<a class="headerlink" href="#forge-sponge" title="Ссылка на этот заголовок">¶</a></h3>
|
||||
<p>Прежде чем производить установку, необходимо определить, какой именно файл подлежит модификации:</p>
|
||||
<ul class="simple">
|
||||
<li><p><strong>>=1.16</strong>: <code class="docutils literal notranslate"><span class="pre">libraries/net/minecraft/server/ВЕРСИЯ-ЦИФРЫ/server-ВЕРСИЯ-ЦИФРЫ-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/ВЕРСИЯ/server-ВЕРСИЯ-extra.jar</span></code>.</p></li>
|
||||
<li><p><strong><=1.12</strong>: <code class="docutils literal notranslate"><span class="pre">minecraft_server.ВЕРСИЯ.jar</span></code>.</p></li>
|
||||
</ul>
|
||||
<p>Когда необходимый файл найден, выполните для него установку authlib, аналогично <a class="reference external" href="#vanilla">оригинальному серверу</a>.</p>
|
||||
</div>
|
||||
<div class="section" id="paper-paperspigot">
|
||||
<h3>Paper (PaperSpigot)<a class="headerlink" href="#paper-paperspigot" title="Ссылка на этот заголовок">¶</a></h3>
|
||||
<p>Установка производится по аналогии с <a class="reference external" href="#bukkit-spigot">Bukkit/Spigot</a> в файл <code class="docutils literal notranslate"><span class="pre">cache/patched-ВЕРСИЯ.jar</span></code>. После внесения изменений, запускать сервер нужно через jar-файл из директории <code class="docutils literal notranslate"><span class="pre">cache</span></code>, поскольку в противном случае <strong>Paper восстановит исходное состояние файла</strong>:</p>
|
||||
<div class="line-block">
|
||||
<div class="line">До: <code class="docutils literal notranslate"><span class="pre">java</span> <span class="pre">-jar</span> <span class="pre">paper-ВЕРСИЯ-БИЛД.jar</span></code></div>
|
||||
<div class="line">После: <code class="docutils literal notranslate"><span class="pre">java</span> <span class="pre">-jar</span> <span class="pre">cache/patched-ВЕРСИЯ.jar</span></code></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="bungeecord">
|
||||
<h2>BungeeCord<a class="headerlink" href="#bungeecord" title="Ссылка на этот заголовок">¶</a></h2>
|
||||
<div class="admonition hint">
|
||||
<p class="admonition-title">Подсказка</p>
|
||||
<p>Вы можете воспользоваться библиотекой <a class="reference internal" href="/ru/authlib-injector.html"><span class="doc">authlib-injector</span></a> для установки системы авторизации без модификации внутренностей сервера.</p>
|
||||
</div>
|
||||
<p>Хотя BungeeCord и является проксирующим сервером, авторизацию игроков он выполняет самостоятельно. К сожалению, BungeeCord не опирается на использование Authlib, а реализует процесс авторизации самостоятельно, поэтому для установки системы авторизации Ely.by вам понадобится модифицировать скомпилированные <code class="docutils literal notranslate"><span class="pre">.class</span></code> файлы.</p>
|
||||
<p>Для установки следуйте инструкции ниже:</p>
|
||||
<ol class="arabic">
|
||||
<li><p>Скачайте программу InClassTranslator (прямых ссылок не даём, но его легко найти).</p></li>
|
||||
<li><p>С помощью архиватора откройте файл <code class="docutils literal notranslate"><span class="pre">BungeeCord.jar</span></code>.</p></li>
|
||||
<li><p>Перейдите по пути <code class="docutils literal notranslate"><span class="pre">net/md_5/bungee/connection</span></code> и найдите там файл <code class="docutils literal notranslate"><span class="pre">InitialHandler.class</span></code> (без каких-либо символов $).</p></li>
|
||||
<li><p>Распакуйте этот файл. В самом простом случае сделать это можно просто «вытянув» его из окна архиватора.</p></li>
|
||||
<li><p>Откройте распакованный файл в программе InClassTranslator и замените в нём строку <code class="docutils literal notranslate"><span class="pre">https://sessionserver.mojang.com/session/minecraft/hasJoined?username=</span></code> на <code class="docutils literal notranslate"><span class="pre">https://authserver.ely.by/session/hasJoined?username=</span></code>, как показано на рисунке ниже:</p>
|
||||
<div class="figure align-center">
|
||||
<img alt="Редактирование в InClassTranslator" src="/_images/bungeecord_inclasstranslator.png">
|
||||
</div>
|
||||
</li>
|
||||
<li><p>Сохраните изменения и перетащите измененный файл обратно в архив сервера. Подтвердите замену.</p>
|
||||
<div class="figure align-center">
|
||||
<img alt="Перетаскивание отредактированного файла назад в архив" src="/_images/bungeecord_move.png">
|
||||
</div>
|
||||
</li>
|
||||
</ol>
|
||||
<p>После выполнения этих действий вы можете указать в файле конфигурации BungeeCord (<code class="docutils literal notranslate"><span class="pre">config.yml</span></code>) значение <code class="docutils literal notranslate"><span class="pre">online_mode=true</span></code>.</p>
|
||||
<div class="admonition important">
|
||||
<p class="admonition-title">Важно</p>
|
||||
<p>Мы также рекомендуем выполнить установку Authlib на все сервера позади BungeeCord. Это может быть необходимо для плагинов, которые используют API Mojang. Инструкция по установке на конечные сервера приведена <a class="reference external" href="#install-server">выше</a>.</p>
|
||||
<p>При этом все сервера должны иметь в своей конфигурации (<code class="docutils literal notranslate"><span class="pre">server.properties</span></code>) значение <code class="docutils literal notranslate"><span class="pre">online-mode=false</span></code>, поскольку пользователи уже авторизованы силами BungeeCord.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="id15">
|
||||
<h2>Установка на версии ниже 1.7.2<a class="headerlink" href="#id15" title="Ссылка на этот заголовок">¶</a></h2>
|
||||
<p>Для более старых версий существует достаточно большое многообразие различных случаев, раскрыть которые в этой документации не представляется возможным. Вся установка заключается в замене определённых строк в определённых классах через InClassTranslator.</p>
|
||||
<p>На форуме RuBukkit есть отличный пост, в котором собрана вся нужна информация по именам классов на различных версиях Minecraft. Переписывать его сюда не имеет смысла, так что просто перейдите на его страницу и найдите нужную версию.</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>Пример установки<a class="headerlink" href="#id16" title="Ссылка на этот заголовок">¶</a></h3>
|
||||
<p>Предположим, что вы хотите установить авторизацию на сервер версии 1.5.2.</p>
|
||||
<p>Сначала вы переходите по вышеприведённой ссылке, выбираете нужную версию (1.5.2) и видите список классов:</p>
|
||||
<ul class="simple">
|
||||
<li><p><strong>bdk.class</strong> - путь до joinserver</p></li>
|
||||
<li><p><strong>jg.class</strong> - путь до checkserver</p></li>
|
||||
</ul>
|
||||
<p>Затем вы должны взять .jar файл клиента и открыть его любым архиватором. После чего вам необходимо найти файл <strong>bdk.class</strong>. Для этого удобно воспользоваться поиском.</p>
|
||||
<p>После того, как вы нашли файл, его нужно извлечь из архива - просто перетащите его оттуда в удобную для вас дирикторию.</p>
|
||||
<p>Дальше запустите InClassTranslator и в нём откройте этот класс. Слева будет список найденных в файле строк, которые вы можете изменить. Нужно заменить только строку, отвечающую за запрос на подключение к серверу:</p>
|
||||
<div class="figure align-center">
|
||||
<img alt="Порядок редактирования: выбрать нужную строку, изменить, сохранить." src="/_images/installing_by_inclasstranslator.png">
|
||||
</div>
|
||||
<p>После этого вам нужно положить изменённый .class обратно в .jar файл игры.</p>
|
||||
<p>Ту же самую операцию вам необходимо провести и с сервером, только заменить ссылку на hasJoined.</p>
|
||||
<hr class="docutils">
|
||||
<p>После этих действий вам нужно в настройках включить online-mode=true и сервер станет пускать на себя только тех игроков, которые будут авторизованы через Ely.by.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<footer>
|
||||
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
|
||||
<a href="/ru/oauth.html" class="btn btn-neutral float-right" title="Авторизация по протоколу OAuth2" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
|
||||
<a href="/ru/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>
|
639
ru/oauth.html
Normal file
@ -0,0 +1,639 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="ru">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Авторизация по протоколу OAuth2 — 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="/ru/_static/documentation_options.js"></script>
|
||||
<script src="/_static/jquery.js"></script>
|
||||
<script src="/_static/underscore.js"></script>
|
||||
<script src="/_static/doctools.js"></script>
|
||||
<script src="/ru/_static/translations.js"></script>
|
||||
|
||||
<script type="text/javascript" src="/_static/js/theme.js"></script>
|
||||
|
||||
|
||||
<link rel="index" title="Алфавитный указатель" href="/ru/genindex.html">
|
||||
<link rel="search" title="Поиск" href="/ru/search.html">
|
||||
<link rel="next" title="Система скинов" href="/ru/skins-system.html">
|
||||
<link rel="prev" title="Авторизация для Minecraft" href="/ru/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="/ru/index.html" class="icon icon-home"> Ely.by Documentation
|
||||
|
||||
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div role="search">
|
||||
<form id="rtd-search-form" class="wy-form" action="/ru/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">Статьи на русском:</span></p>
|
||||
<ul class="current">
|
||||
<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 current"><a class="current reference internal" href="#">Авторизация по протоколу OAuth2</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#id1">Регистрация приложения</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#id3">Инициализация авторизации</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#authorization-code-grant">Обмен кода на ключ</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#authorization-code-grant-response">Ответ сервера</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#id8">Получение информации о пользователе</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#refresh-token-grant">Обновление токена доступа</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#id12">Готовые библиотеки</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#id13">Возможные ошибки</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#auth-start-errors">Ошибки при инициализации авторизации</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#issue-token-errors">Ошибки при обмене кода на ключ</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#id18">Ошибки при запросе информации о пользователе</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#id19">Ошибки при обновлении токена доступа</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/ru/skins-system.html">Система скинов</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">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>
|
||||
</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="/ru/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="/ru/index.html" class="icon icon-home"></a> »</li>
|
||||
|
||||
<li>Авторизация по протоколу OAuth2</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>Авторизация по протоколу OAuth2<a class="headerlink" href="#oauth2" title="Ссылка на этот заголовок">¶</a></h1>
|
||||
<p>На этой странице вы найдёте информацию о реализации авторизации по протоколу OAuth2 на вашем проекте через сервис Аккаунты Ely.by. Реализация этого протокола позволяет вашим пользователям производить авторизацию с использованием своего аккаунта Ely.by.</p>
|
||||
<div class="section" id="id1">
|
||||
<h2>Регистрация приложения<a class="headerlink" href="#id1" title="Ссылка на этот заголовок">¶</a></h2>
|
||||
<p>Для начала вам необходимо <a class="reference external" href="https://account.ely.by/dev/applications/new">создать новое приложение</a>. Выберите тип приложения <strong>Веб‑сайт</strong>. В качестве <em>адреса переадресации</em> можно указать только домен, но для повышения безопасности лучше использовать полный путь переадресации. Примеры допустимых адресов:</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>После успешного добавления приложения вы попадёте на страницу со списком всех ваших приложений. Кликнув по названию приложения вы увидите его идентификатор <code class="docutils literal notranslate"><span class="pre">clientId</span></code> и секрет <code class="docutils literal notranslate"><span class="pre">clientSecret</span></code>. Они буду использоваться на следующих шагах.</p>
|
||||
</div>
|
||||
<div class="section" id="id3">
|
||||
<h2>Инициализация авторизации<a class="headerlink" href="#id3" title="Ссылка на этот заголовок">¶</a></h2>
|
||||
<p>Для инициализации процесса авторизации вам необходимо перенаправить пользователя по следующему 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">Допустимые параметры запроса</span><a class="headerlink" href="#id21" title="Постоянная ссылка на таблицу">¶</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>Параметр</p></th>
|
||||
<th class="head"><p>Пример значения</p></th>
|
||||
<th class="head"><p>Описание</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>Обязательное</strong>. ClientId, полученный при регистрации.</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>Обязательное</strong>. Адрес обратной переадресации, совпадающий с адресом, указанным при регистрации приложения</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>Обязательное</strong>. Тип ответа. На данный момент поддерживается только <code class="docutils literal notranslate"><span class="pre">code</span></code>.</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>Обязательное</strong>. Перечень разрешений, доступ к которым вы хотите получить, разделённые пробелом. Смотрите все доступные права в <a class="reference external" href="#available-scopes">разделе ниже</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>Случайно сгенерированная строка. Используется для увеличения безопасности в качестве идентификатора сессии. Будет возвращена в неизменённом виде после завершения авторизации.</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>Если ваше приложение доступно на нескольких языках, то используя это поле вы можете переопределить стандартное описание в соответствии с предпочтительным языком пользователя.</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> или <code class="docutils literal notranslate"><span class="pre">select_account</span></code></p></td>
|
||||
<td><p>Принудительно отобразить запрос прав (<code class="docutils literal notranslate"><span class="pre">consent</span></code>) или принудительно запросить выбор аккаунта (<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> или <code class="docutils literal notranslate"><span class="pre">erickskrauch@ely.by</span></code></p></td>
|
||||
<td><p>Если у пользователя есть несколько аккаунтов, то указав этот в этом параметре username или E-mail пользователя вы автоматически выберете аккаунт за него. Это полезно в случае повторного входа, когда токен истёк.</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<span id="available-scopes"></span><table class="colwidths-given docutils align-default" id="id22">
|
||||
<caption><span class="caption-text">Перечень доступных scopes</span><a class="headerlink" href="#id22" title="Постоянная ссылка на таблицу">¶</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>Получение информации о пользователе.</p></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><p><strong>account_email</strong></p></td>
|
||||
<td><p>В ответе на запрос информации о пользователе будет также присутствовать его email.</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p><strong>offline_access</strong></p></td>
|
||||
<td><p>Вместе с <code class="docutils literal notranslate"><span class="pre">access_token</span></code> вы также получите и <code class="docutils literal notranslate"><span class="pre">refresh_token</span></code>. Смотрите подробнее <a class="reference external" href="#refresh-token-grant">соответствующем разделе</a>.</p></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><p><strong>minecraft_server_session</strong></p></td>
|
||||
<td><p><code class="docutils literal notranslate"><span class="pre">access_token</span></code> можно будет использовать в качестве сессии для Minecraft.</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<hr class="docutils">
|
||||
<p>Сформировав ссылку, разместите её в вашем шаблоне:</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>По нажатию на ссылку, пользователь попадёт на нашу страницу авторизации, откуда после он будет перенаправлен обратно по адресу, указанному в параметре <code class="docutils literal notranslate"><span class="pre">redirect_uri</span></code>.</p>
|
||||
<p>Обратная переадресация выполняется в виде <code class="docutils literal notranslate"><span class="pre"><redirect_uri>?code=<код</span> <span class="pre">авторизации>&state=<state></span></code> для успешной авторизации и <code class="docutils literal notranslate"><span class="pre"><redirect_uri?error=<идентификатор</span> <span class="pre">ошибки>&error_message=<описание</span> <span class="pre">ошибки></span></code> для неудачной.</p>
|
||||
<p>Пример успешного и неудачного редиректов:</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>Обмен кода на ключ<a class="headerlink" href="#authorization-code-grant" title="Ссылка на этот заголовок">¶</a></h2>
|
||||
<p>После получения кода авторизации (<code class="docutils literal notranslate"><span class="pre">auth_code</span></code>), вам необходимо обменять его на ключ авторизации (<code class="docutils literal notranslate"><span class="pre">access_key</span></code>). Для этого необходимо выполнить POST запрос на 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>И передать туда следующие параметры:</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, полученный при регистрации приложения.</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, полученный при регистрации приложения.</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>Точный адрес, использованный для переадресации пользователя.</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>В данном случае указывается <code class="docutils literal notranslate"><span class="pre">authorization_code</span></code>.</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">code</span></code></p></td>
|
||||
<td><p>Код авторизации, полученный в GET-параметрах после успешной переадресации.</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p><strong>Пример реализации обмена на 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>Пояснение к коду:</p>
|
||||
<ul class="simple">
|
||||
<li><p>Сначала мы объявляем переменную <code class="docutils literal notranslate"><span class="pre">$oauthParams</span></code>, в которую заносим значения, полученные после регистрации приложения.</p></li>
|
||||
<li><p>Затем проверяем, не возникла-ли ошибка. В этом случае сразу же прерываем выполнение.</p></li>
|
||||
<li><p>Формируем POST запрос к форме обмена <code class="docutils literal notranslate"><span class="pre">code</span></code> на <code class="docutils literal notranslate"><span class="pre">access_token</span></code>, передавая необходимые поля.</p></li>
|
||||
<li><p>Выполняем запрос, получаем ответ, переводим его из JSON в ассоциативный массив.</p></li>
|
||||
</ul>
|
||||
<div class="section" id="authorization-code-grant-response">
|
||||
<span id="id7"></span><h3>Ответ сервера<a class="headerlink" href="#authorization-code-grant-response" title="Ссылка на этот заголовок">¶</a></h3>
|
||||
<p>В случае успешного запроса в теле ответа будет находиться результат обмена кода авторизации на <code class="docutils literal notranslate"><span class="pre">access_token</span></code>. Данные являются JSON документом и могут быть легко интерпретированы средствами используемого языка программирования.</p>
|
||||
<p>Тело JSON документа содержит следующие поля:</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>На этом процедура авторизации закончена. Полученный <code class="docutils literal notranslate"><span class="pre">access_token</span></code> может быть использован для получения информации о пользователе и взаимодействия с нашим API.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="id8">
|
||||
<h2>Получение информации о пользователе<a class="headerlink" href="#id8" title="Ссылка на этот заголовок">¶</a></h2>
|
||||
<p>Если полученный токен имеет scope <code class="docutils literal notranslate"><span class="pre">account_info</span></code>, то вы можете запросить информацию об аккаунте пользователя. Для этого необходимо отправить запрос на 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>Для передачи <code class="docutils literal notranslate"><span class="pre">access_token</span></code> используется заголовок <code class="docutils literal notranslate"><span class="pre">Authorization</span></code> со значением <code class="docutils literal notranslate"><span class="pre">Bearer</span> <span class="pre">{access_token}</span></code>.</p>
|
||||
<p><strong>Пример реализации получения информации о пользователе на 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>В ответ вы получите JSON документ со следующим содержимым:</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>Обратите внимание, что поле <code class="docutils literal notranslate"><span class="pre">email</span></code> будет присутствовать лишь в том случае, когда был запрошен scope <code class="docutils literal notranslate"><span class="pre">account_email</span></code>.</p>
|
||||
<div class="admonition note">
|
||||
<p class="admonition-title">Примечание</p>
|
||||
<p>В ходе дальнейшего развития сервиса, количество возвращаемых полей может увеличиться, но уже существующие останутся теми же.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="refresh-token-grant">
|
||||
<span id="id9"></span><h2>Обновление токена доступа<a class="headerlink" href="#refresh-token-grant" title="Ссылка на этот заголовок">¶</a></h2>
|
||||
<p>Если при выполнении авторизации вами было запрошено право на получение scope <code class="docutils literal notranslate"><span class="pre">offline_access</span></code>, то вместе с <code class="docutils literal notranslate"><span class="pre">access_token</span></code> вы также получите и <code class="docutils literal notranslate"><span class="pre">refresh_token</span></code>. Данный токен не истекает и может быть использован для получения нового токена доступа, когда он истечёт.</p>
|
||||
<p>Для выполнения операции обновления токена необходимо отправить POST запрос на тот же URL, что использовался и <a class="reference external" href="#authorization-code-grant">при обмене кода на ключ доступа</a>, но со следующими параметрами:</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, полученный при регистрации приложения.</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, полученный при регистрации приложения.</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">scope</span></code></p></td>
|
||||
<td><p>Те же scope, что были запрошены и при получении начального токена доступа. Попытка запросить большее количество прав приведёт к ошибке.</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>Непосредственно токен, полученный вместе с начальным токеном доступа.</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p><strong>Пример реализации обновления токена доступа на 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>В качестве ответа будет точно такое же тело, какое было получено в результате <a class="reference external" href="#authorization-code-grant-response">обмена кода на ключ доступа</a>. Поле <code class="docutils literal notranslate"><span class="pre">refresh_token</span></code> будет отсутствовать.</p>
|
||||
</div>
|
||||
<div class="section" id="id12">
|
||||
<h2>Готовые библиотеки<a class="headerlink" href="#id12" title="Ссылка на этот заголовок">¶</a></h2>
|
||||
<p>Более простым способом будет использовать уже готовую библиотеку, которой будет необходимо передать лишь регистрационные параметры. Ниже перечислены библиотеки для различных языков программирования. Вы можете дополнить этот список своей библиотекой.</p>
|
||||
<ul class="simple">
|
||||
<li><p><strong>PHP</strong>:</p>
|
||||
<ul>
|
||||
<li><p>[Официальная] <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>[Официальная] <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>Возможные ошибки<a class="headerlink" href="#id13" title="Ссылка на этот заголовок">¶</a></h2>
|
||||
<p>Ниже приведены стандартные ошибки, которые вы можете получить в случае неправильной передачи данных на сервер авторизации. Если вы столкнулись с ошибкой, не описанной в этой документации, пожалуйста, сообщите о ней через <a class="reference external" href="https://ely.by/site/contact">форму обратной связи</a>.</p>
|
||||
<div class="section" id="auth-start-errors">
|
||||
<span id="id15"></span><h3>Ошибки при инициализации авторизации<a class="headerlink" href="#auth-start-errors" title="Ссылка на этот заголовок">¶</a></h3>
|
||||
<p>Этот раздел описывает ошибки, отображаемые при переадресации пользователя с вашего сайта на нашу страницу инициализации авторизации.</p>
|
||||
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>Invalid request ({parameter} required).
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Данная ошибка означает, что вы передали не все необходимые параметры. Чтобы решить эту ошибку просто добавьте недостающий параметр.</p>
|
||||
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>Invalid response type '{invalid_response_type_value}'.
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Данная ошибка означает, что вы передали неподдерживаемый тип <code class="docutils literal notranslate"><span class="pre">response_type</span></code>. На данный момент поддерживается только значение <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>Ошибка указывает на то, что было запрошено неизвестный <code class="docutils literal notranslate"><span class="pre">scope</span></code>. Убедитесь, что вы запрашиваете <a class="reference external" href="#available-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>Данная ошибка говорит о том, что переданные параметры не соответствуют ни одному из зарегистрированных приложений. Для решения проблемы исправьте ваши значения <code class="docutils literal notranslate"><span class="pre">client_id</span></code> и <code class="docutils literal notranslate"><span class="pre">redirect_uri</span></code>.</p>
|
||||
</div>
|
||||
<div class="section" id="issue-token-errors">
|
||||
<span id="id17"></span><h3>Ошибки при обмене кода на ключ<a class="headerlink" href="#issue-token-errors" title="Ссылка на этот заголовок">¶</a></h3>
|
||||
<p>В случае возникновения ошибки вместо ожидаемого ответа с <code class="docutils literal notranslate"><span class="pre">200</span></code> статусом вы получите <code class="docutils literal notranslate"><span class="pre">40x</span></code> код и следующие 2 поля:</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>В поле <code class="docutils literal notranslate"><span class="pre">error</span></code> находится системный идентификатор ошибки, в <code class="docutils literal notranslate"><span class="pre">error_description</span></code> — описание ошибки на английском языке.</p>
|
||||
<p><strong>Возможные значения error:</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>Переданы не все необходимые параметры запроса или значение <code class="docutils literal notranslate"><span class="pre">code</span></code> не был найден в базе выданных кодов.</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>Данная ошибка сигнализирует о том, что вы попытались произвести авторизацию по неизвестному для нашего OAuth2 сервера типу Grant.</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>Эта ошибка возникает в случае, когда трио значений <code class="docutils literal notranslate"><span class="pre">client_id</span></code>, <code class="docutils literal notranslate"><span class="pre">client_secret</span></code> и <code class="docutils literal notranslate"><span class="pre">redirect_uri</span></code> не совпали ни с одним из зарегистрированных приложений.</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="section" id="id18">
|
||||
<h3>Ошибки при запросе информации о пользователе<a class="headerlink" href="#id18" title="Ссылка на этот заголовок">¶</a></h3>
|
||||
<p>Ответ со статусом <code class="docutils literal notranslate"><span class="pre">401</span></code> указывает на то, что заголовок <code class="docutils literal notranslate"><span class="pre">Authorization</span></code> не присутствует в запросе или его значение сформировано неверно. Тело ответа будет следующим:</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>Ответ со статусом <code class="docutils literal notranslate"><span class="pre">403</span></code> сигнализирует о том, что переданный в заголовке <code class="docutils literal notranslate"><span class="pre">Authorization</span></code> токен не содержит scope <code class="docutils literal notranslate"><span class="pre">account_info</span></code> или он истёк. Получаемый ответ будет иметь следующий формат:</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>Ошибки при обновлении токена доступа<a class="headerlink" href="#id19" title="Ссылка на этот заголовок">¶</a></h3>
|
||||
<p>При выполнении обновления токена доступа вам могут встретиться те же ошибки, что и при <a class="reference external" href="#issue-token-errors">обмене кода на ключ доступа</a>, а также несколько новых:</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>Переданы не все необходимые параметры запроса или значение <code class="docutils literal notranslate"><span class="pre">refresh_token</span></code> не был найден в базе выданных токенов.</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>Были перечислены неподдерживаемые scope или запрошено больше, чем было у изначального токена.</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<footer>
|
||||
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
|
||||
<a href="/ru/skins-system.html" class="btn btn-neutral float-right" title="Система скинов" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
|
||||
<a href="/ru/minecraft-auth.html" class="btn btn-neutral float-left" title="Авторизация для 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>
|
259
ru/search.html
Normal file
@ -0,0 +1,259 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="ru">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Поиск — 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="/ru/_static/documentation_options.js"></script>
|
||||
<script src="/_static/jquery.js"></script>
|
||||
<script src="/_static/underscore.js"></script>
|
||||
<script src="/_static/doctools.js"></script>
|
||||
<script src="/ru/_static/translations.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="/ru/_static/language_data.js"></script>
|
||||
<link rel="index" title="Алфавитный указатель" href="/ru/genindex.html">
|
||||
<link rel="search" title="Поиск" 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="/ru/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">Статьи на русском:</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 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>
|
||||
</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="/ru/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="/ru/index.html" class="icon icon-home"></a> »</li>
|
||||
|
||||
<li>Поиск</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
ru/searchindex.js
Normal file
421
ru/skins-system.html
Normal file
@ -0,0 +1,421 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="ru">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Система скинов — 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="/ru/_static/documentation_options.js"></script>
|
||||
<script src="/_static/jquery.js"></script>
|
||||
<script src="/_static/underscore.js"></script>
|
||||
<script src="/_static/doctools.js"></script>
|
||||
<script src="/ru/_static/translations.js"></script>
|
||||
|
||||
<script type="text/javascript" src="/_static/js/theme.js"></script>
|
||||
|
||||
|
||||
<link rel="index" title="Алфавитный указатель" href="/ru/genindex.html">
|
||||
<link rel="search" title="Поиск" href="/ru/search.html">
|
||||
<link rel="prev" title="Авторизация по протоколу OAuth2" href="/ru/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="/ru/index.html" class="icon icon-home"> Ely.by Documentation
|
||||
|
||||
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div role="search">
|
||||
<form id="rtd-search-form" class="wy-form" action="/ru/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">Статьи на русском:</span></p>
|
||||
<ul class="current">
|
||||
<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 current"><a class="current reference internal" href="#">Система скинов</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#url">URL-адреса запросов</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#id6">Вспомогательные URL</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#textures-proxy">Проксирование текстур</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#id13">Готовые реализации</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">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>
|
||||
</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="/ru/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="/ru/index.html" class="icon icon-home"></a> »</li>
|
||||
|
||||
<li>Система скинов</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>Система скинов<a class="headerlink" href="#id1" title="Ссылка на этот заголовок">¶</a></h1>
|
||||
<p>На этой странице вы найдёте информацию о доступных запросах к сервису системы скинов Ely.by. Вы можете использовать любой из них как дополнительный или основной источник скинов для своего проекта.</p>
|
||||
<p>Сервис системы скинов Ely.by обеспечивает <a class="reference external" href="#textures-proxy">проксирование текстур владельцев лицензии Minecraft</a>, что означает, что при использовании этого сервиса игроки будут видеть как скины премиум пользователей Minecraft, так и скины пользователей сервиса Ely.by.</p>
|
||||
<p>Мы стремимся соответствовать официальной системе скинов и не поддерживаем ушки и HD-скины. Система поддерживает плащи, но не позволяет игрокам самостоятельно их надевать.</p>
|
||||
<p>Если у вас есть предложения по развитию существующего функционала, пожалуйста, <a class="reference external" href="https://github.com/elyby/chrly/issues/new">создайте новый Issue</a> в <a class="reference external" href="https://github.com/elyby/chrly">репозитории проекта Chrly</a>.</p>
|
||||
<div class="admonition note">
|
||||
<p class="admonition-title">Примечание</p>
|
||||
<p>Вы можете найти более подробную информацию о реализации сервера системы скинов в <a class="reference external" href="https://github.com/elyby/chrly">репозитории проекта Chrly</a>.</p>
|
||||
</div>
|
||||
<div class="section" id="url">
|
||||
<h2>URL-адреса запросов<a class="headerlink" href="#url" title="Ссылка на этот заголовок">¶</a></h2>
|
||||
<p>Система скинов размещена на домене <code class="docutils literal notranslate"><span class="pre">http://skinsystem.ely.by</span></code>.</p>
|
||||
<p>Во всех запросах параметр <code class="docutils literal notranslate"><span class="pre">nickname</span></code> должен быть заменён на ник игрока. Значение не чувствительно к регистру.</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 для загрузки текстуры скина. Расширение <code class="docutils literal notranslate"><span class="pre">.png</span></code> опционально. Если текстура не будет найдена, сервер вернёт ответ с <code class="docutils literal notranslate"><span class="pre">404</span></code> статусом.</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 для загрузки текстуры плаща. Расширение <code class="docutils literal notranslate"><span class="pre">.png</span></code> опционально. Если текстура не будет найдена, сервер вернёт ответ с <code class="docutils literal notranslate"><span class="pre">404</span></code> статусом.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt>
|
||||
<code class="sig-name descname"><span class="pre">/textures/{nickname}</span></code></dt>
|
||||
<dd><p>По этому URL вы можете получить текстуры в формате, указанному в поле <code class="docutils literal notranslate"><span class="pre">textures</span></code> одноимённого property в <a class="reference external" href="https://wiki.vg/Mojang_API#UUID_-.3E_Profile_.2B_Skin.2FCape">ответе на запрос подписанных текстур</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>В зависимости от доступных игроку текстур могут отсутствовать поля <code class="docutils literal notranslate"><span class="pre">SKIN</span></code> или <code class="docutils literal notranslate"><span class="pre">CAPE</span></code>. Если модель скина не является <code class="docutils literal notranslate"><span class="pre">slim</span></code>, то поле <code class="docutils literal notranslate"><span class="pre">metadata</span></code> также будет отсутствовать.</p>
|
||||
<p>Если текстуры не будут найдены, сервер вернёт пустой ответ с <code class="docutils literal notranslate"><span class="pre">204</span></code> статусом.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt>
|
||||
<code class="sig-name descname"><span class="pre">/profile/{nickname}</span></code></dt>
|
||||
<dd><p>Данный запрос является аналогом запроса <a class="reference external" href="https://wiki.vg/Mojang_API#UUID_-.3E_Profile_.2B_Skin.2FCape">профиля игрока в API Mojang</a>, только вместо идентификации пользователя по UUID используется его ник. Также, как и в API Mojang, вы можете добавить к запросу <code class="docutils literal notranslate"><span class="pre">?unsigned=false</span></code>, чтобы получить текстуры с подписью. В ответе также будет присутствовать дополнительное property с <code class="docutils literal notranslate"><span class="pre">name</span></code> равным <strong>ely</strong>.</p>
|
||||
<p>Если у пользователя нет текстур, то они будут запрошены через прокси Mojang, после чего переподписаны с использованием <a class="reference external" href="#signature-verification-key-request">нашего ключа подписи</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>Если запрошенный никнейм не будет найден ни в локальном хранилище, ни у Mojang, сервер вернёт пустой ответ с <code class="docutils literal notranslate"><span class="pre">204</span></code> статусом.</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>Данный запрос возвращает публичный ключ, который может быть использован для проверки подписи текстур. Ключ предоставляется в формате <code class="docutils literal notranslate"><span class="pre">DER</span></code>. Этот формат используется внутри Authlib, поэтому ключ может быть в ней использован без модификации алгоритма проверки подписи.</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>Такой же запрос, что и предыдущий, но возвращает ключ в формате <code class="docutils literal notranslate"><span class="pre">PEM</span></code>.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt>
|
||||
<code class="sig-name descname"><span class="pre">/textures/signed/{nickname}</span></code></dt>
|
||||
<dd><p>Этот запрос используется в нашем <a class="reference external" href="https://ely.by/server-skins-system">плагине серверной системы скинов</a> для загрузки текстур с оригинальной подписью Mojang. Полученные в ответе текстуры могут быть без изменений переданы в немодифицированный игровой клиент. В ответе также будет присутствовать дополнительное property с <code class="docutils literal notranslate"><span class="pre">name</span></code> равным <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>По умолчанию для этого запроса не применяется проксирование текстур. Чтобы его включить, добавьте дополнительный GET параметр <code class="docutils literal notranslate"><span class="pre">?proxy=true</span></code>.</p>
|
||||
<p>Если текстуры не будут найдены, сервер вернёт пустой ответ с <code class="docutils literal notranslate"><span class="pre">204</span></code> статусом.</p>
|
||||
</dd></dl>
|
||||
|
||||
<hr class="docutils">
|
||||
<p>При совершении любого из вышеописанных запросов вы также можете передать ряд дополнительных GET параметров. Они будут использованы для анализа использования сервиса разными версиями игры.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">version</dt>
|
||||
<dd class="field-odd"><p>Версия протокола, по которому идёт запрос на скины. На данный момент это версия <code class="docutils literal notranslate"><span class="pre">2</span></code> , т.е. вам необходимо указать <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>Версия Minecraft, с которой идёт запрос.</p>
|
||||
</dd>
|
||||
<dt class="field-odd">authlib_version</dt>
|
||||
<dd class="field-odd"><p>Версия используемой Authlib. Этот параметр актуален для версий Minecraft 1.7.6+, где для загрузки скинов стала использоваться отдельная библиотека, а не внутриигровой код.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<p>Пример запроса текстур с передачей вышеописанных параметров:</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>Вспомогательные URL<a class="headerlink" href="#id6" title="Ссылка на этот заголовок">¶</a></h3>
|
||||
<p>Также запрос скина и плаща можно выполнить, передавая ник через GET параметр. Эта возможность используется для передачи аналитических параметров в версиях игры до 1.5.2, когда ник просто добавлялся в конец строки. Для этого вся строка выстраивается таким образом, чтобы последним параметром шёл <code class="docutils literal notranslate"><span class="pre">name</span></code>, после добавления ника к которому получался полный запрос на текстуру.</p>
|
||||
<dl class="py function">
|
||||
<dt>
|
||||
<code class="sig-name descname"><span class="pre">/skins?name={nickname}.png</span></code></dt>
|
||||
<dd><p>Смотрите <a class="reference external" href="#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>Смотрите <a class="reference external" href="#cape-request">запрос на получение плаща</a>.</p>
|
||||
</dd></dl>
|
||||
|
||||
<p>Пример запросов на текстуры с передачей параметров выше:</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>Проксирование текстур<a class="headerlink" href="#textures-proxy" title="Ссылка на этот заголовок">¶</a></h2>
|
||||
<p>Сервис системы скинов Ely.by получает текстуры из официальной системы скинов в случае, если в базе данных не было найдено информации о текстурах для запрошенного имени пользователя. Также запрос будет проксирован, если запись о скине будет найдена, но он будет стандартным.</p>
|
||||
<p>Для улучшения пропускной способности проксирующего алгоритма, информация о текстурах кешируется в 2 стадии:</p>
|
||||
<ul class="simple">
|
||||
<li><p>Соответствие ника и UUID хранится в <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">течение 30 дней</a>.</p></li>
|
||||
<li><p>Информация о текстурах обновляется не чаще <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">раза в минуту</a>.</p></li>
|
||||
</ul>
|
||||
<p>Если вы владеете лицензионным аккаунтом Minecraft, но ваш ник занят, пожалуйста, обратитесь в <a class="reference external" href="https://ely.by/site/contact">службу поддержки</a> и после небольшой проверки мы передадим ник в ваше пользование.</p>
|
||||
</div>
|
||||
<div class="section" id="id13">
|
||||
<h2>Готовые реализации<a class="headerlink" href="#id13" title="Ссылка на этот заголовок">¶</a></h2>
|
||||
<p>Готовые реализации патчей и инструкции по их установке могут быть найдены в <a class="reference external" href="https://ely.by/load">разделе загрузок на главном сайте Ely.by</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<footer>
|
||||
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
|
||||
<a href="/ru/oauth.html" class="btn btn-neutral float-left" title="Авторизация по протоколу OAuth2" 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>
|