{"id":317062,"date":"2021-01-27T21:00:14","date_gmt":"2021-01-27T21:00:14","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=317062"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=317062","title":{"rendered":"OAuth 2.0 -&gt; OAuth 2.1. \u0427\u0442\u043e \u0434\u0430\u043b\u044c\u0448\u0435?"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\">\n<blockquote><p><i>\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u043e\u0440\u044b \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0432\u044b\u0434\u0443\u043c\u044b\u0432\u0430\u044e\u0442. \u041e\u043d\u0438 \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0438\u0440\u0443\u044e\u0442 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c.<\/i><\/p>\n<p>  \u0410\u043b\u0432\u0430\u0440\u043e \u0421\u0438\u0437\u0430 \u0412\u0438\u044d\u0439\u0440\u0430  <\/p><\/blockquote>\n<p>  \u041c\u043d\u043e\u0433\u043e \u0432\u0441\u0435\u0433\u043e \u0443\u0436\u0435 \u0441\u043a\u0430\u0437\u0430\u043d\u043e \u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u043f\u0440\u043e <a href=\"https:\/\/tools.ietf.org\/html\/rfc6749\" rel=\"nofollow noopener noreferrer\">\u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 OAuth 2.0<\/a> \u0441 2012 \u0433\u043e\u0434\u0430. \u0418, \u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0431\u044b, \u0432\u0441\u0435 \u0434\u0430\u0432\u043d\u043e \u0435\u0433\u043e \u0437\u043d\u0430\u044e\u0442, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442, \u0432\u0441\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u043e \u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e. <br \/>  \u041d\u043e, \u043a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u043e, \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u0432\u0441\u0435 \u0438\u043d\u0430\u0447\u0435. \u0412 \u0440\u0430\u0431\u043e\u0442\u0435 \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0441 \u043d\u0435\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u043c\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f\u043c\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438. \u041e\u0433\u043e\u0440\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u043f\u043e <a href=\"https:\/\/cybermap.kaspersky.com\/ru\/stats\" rel=\"nofollow noopener noreferrer\">\u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0435<\/a> \u0420\u043e\u0441\u0441\u0438\u044f \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u043d\u0435\u043f\u043e\u0447\u0435\u0442\u043d\u043e\u0435 \u043f\u0435\u0440\u0432\u043e\u0435 \u043c\u0435\u0441\u0442\u043e \u043f\u043e \u0441\u0432\u043e\u0435\u0439 \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0438. <br \/>  \u041f\u043e\u0447\u0435\u043c\u0443 \u0436\u0435 \u0442\u0430\u043a \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f? \u041f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0432\u043c\u0435\u0441\u0442\u0435 \u0441\u043e \u043c\u043d\u043e\u0439 \u0438 \u0430\u0432\u0442\u043e\u0440\u0430\u043c\u0438 \u0434\u0440\u0430\u0444\u0442\u0430 <a href=\"https:\/\/tools.ietf.org\/html\/draft-ietf-oauth-v2-1-00\" rel=\"nofollow noopener noreferrer\">OAuth 2.1<\/a> \u043e\u0442 \u0438\u044e\u043b\u044f 2020 \u0433\u043e\u0434\u0430 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0440\u0430\u0431\u043e\u0442\u0443 \u043d\u0430\u0434 \u043e\u0448\u0438\u0431\u043a\u0430\u043c\u0438. \u042d\u0442\u043e \u0438 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u0440\u0430\u0436\u0435\u043d\u0438\u0435\u043c, \u043d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u0442\u043e\u0433\u043e, \u043f\u043e \u043a\u0430\u043a\u043e\u043c\u0443 \u043f\u0443\u0442\u0438 \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u044f \u0438\u0434\u0435\u0442 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a OAuth 2. <\/p>\n<p>  \u0422\u0430\u043a\u0436\u0435 \u0441\u043f\u0435\u0448\u0443 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0434\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u0433\u043e\u0433\u043e \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044f, \u0447\u0442\u043e \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0437\u0430\u0442\u0440\u043e\u043d\u0443 \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0438 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f\u043c\u0438 \u043f\u043e OAuth 2.0. \u042f \u043d\u0435 \u0441\u0442\u0430\u0432\u043b\u044e \u0446\u0435\u043b\u0438 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0438\u0442\u044c \u0432\u0441\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c\u044e \u0432 \u0420\u043e\u0441\u0441\u0438\u0438 \u0432 \u0418\u0422, \u0438 \u043f\u043e\u0447\u0435\u043c\u0443 \u044d\u0442\u043e\u0442 \u0432\u043e\u043f\u0440\u043e\u0441 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043e\u0441\u043e\u0431\u043e\u0433\u043e \u043f\u0440\u0438\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0441\u0435\u0433\u043e\u0434\u043d\u044f.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h2>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h2>\n<p>  \u0421\u0442\u043e\u0438\u0442 \u043b\u0438 \u0432\u0438\u043d\u0438\u0442\u044c \u0432\u043e \u0432\u0441\u0435\u043c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432, \u043a\u0430\u043a \u044d\u0442\u043e \u043f\u0440\u0438\u043d\u044f\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0447\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e? \u041d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u043d\u0435 \u0441\u0442\u043e\u0438\u0442. \u0423 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u0447\u0430\u0441\u0442\u043e \u0441\u0442\u043e\u0438\u0442 \u0437\u0430\u0434\u0430\u0447\u0435\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u0443 \u0438\u043b\u0438 \u0438\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u043e \u043d\u0435\u043a\u0438\u043c \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f\u043c. \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0436\u0435 \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u0435\u0435 \u043d\u0430 OAuth 2.0. <\/p>\n<p>  \u0424\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c\u0438 \u043f\u043e \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 <a href=\"https:\/\/tools.ietf.org\/html\/rfc6749#section-1.2\" rel=\"nofollow noopener noreferrer\">\u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438<\/a>:  <\/p>\n<ul>\n<li><a href=\"https:\/\/tools.ietf.org\/html\/rfc6749#section-4.1\" rel=\"nofollow noopener noreferrer\">Authorization Code Grant;<\/a><\/li>\n<li><a href=\"https:\/\/tools.ietf.org\/html\/rfc6749#section-4.2\" rel=\"nofollow noopener noreferrer\">Implicit Grant;<\/a><\/li>\n<li><a href=\"https:\/\/tools.ietf.org\/html\/rfc6749#section-4.3\" rel=\"nofollow noopener noreferrer\">Resource Owner Password Credentials Grant;<\/a><\/li>\n<li><a href=\"https:\/\/tools.ietf.org\/html\/rfc6749#section-4.4\" rel=\"nofollow noopener noreferrer\">Client Credentials Grant.<\/a><\/li>\n<\/ul>\n<p>  \u0410 \u0442\u0430\u043a\u0436\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043a \u0444\u043e\u0440\u043c\u0430\u0442\u0430\u043c \u043e\u0431\u043c\u0435\u043d\u0430.<\/p>\n<p>  <b><i>\u00ab\u0427\u0442\u043e \u0432 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u044c \u043a \u043d\u0435\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u043c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f\u043c \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435?\u00bb<\/i><\/b><br \/>  \u042f \u043f\u043e\u043a\u0430 \u043e\u0441\u0442\u0430\u0432\u043b\u044e \u044d\u0442\u043e\u0442 \u0432\u043e\u043f\u0440\u043e\u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c, \u0438 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044e \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u0438 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u0438 OAuth 2.0 \u0438 \u043f\u0440\u043e\u0447\u0442\u0435\u043d\u0438\u0438 \u0441\u0442\u0430\u0442\u044c\u0438 \u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0432\u043e\u0438 \u0432\u044b\u0432\u043e\u0434\u044b. \u041d\u0430 \u043f\u0440\u043e\u0442\u044f\u0436\u0435\u043d\u0438\u0438 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u044f \u0436\u0435 \u0431\u0443\u0434\u0443 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u044c \u0441\u0432\u043e\u0435 \u0432\u0438\u0434\u0435\u043d\u0438\u0435 \u043e\u0442\u0432\u0435\u0442\u0430 \u043d\u0430 \u044d\u0442\u043e\u0442 \u0432\u043e\u043f\u0440\u043e\u0441.<\/p>\n<h2>\u041f\u043e\u043d\u044f\u0442\u0438\u044f \u0438 \u0442\u0435\u0440\u043c\u0438\u043d\u044b<\/h2>\n<p>  \u041f\u0435\u0440\u0435\u0434 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0438\u0435\u043c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437 \u043f\u043e\u0442\u043e\u043a\u043e\u0432, \u0434\u0430\u0434\u0438\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u0442\u0435\u0440\u043c\u0438\u043d\u043e\u043b\u043e\u0433\u0438\u0438, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0439 \u0432 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0435 (\u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044e, \u0437\u043d\u0430\u043a\u043e\u043c\u043e\u043c\u0443 \u0441 \u0442\u0435\u0440\u043c\u0438\u043d\u043e\u043b\u043e\u0433\u0438\u0435\u0439 OAuth 2.0, \u0434\u0430\u043d\u043d\u044b\u0439 \u0430\u0431\u0437\u0430\u0446 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c).  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0422\u0430\u0431\u043b\u0438\u0446\u0430 1. \u0411\u0430\u0437\u043e\u0432\u044b\u0435 \u0442\u0435\u0440\u043c\u0438\u043d\u044b OAuth 2.0<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<div class=\"scrollable-table\">\n<table>\n<tbody>\n<tr>\n<th>\u0422\u0435\u0440\u043c\u0438\u043d\u00a0OAuth 2.0 Authorization Framework<\/th>\n<th>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0438\u0437\u00a0OAuth 2.0<\/th>\n<th>\u041f\u0440\u0438\u043c\u0435\u0440<\/th>\n<\/tr>\n<tr>\n<td>Resource owner <br \/>  (\u0412\u043b\u0430\u0434\u0435\u043b\u0435\u0446 \u0440\u0435\u0441\u0443\u0440\u0441\u0430)<\/td>\n<td>\u0410\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u0430\u044f \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044c, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0430\u044f \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0437\u0430\u0449\u0438\u0449\u0435\u043d\u043d\u043e\u043c \u0440\u0435\u0441\u0443\u0440\u0441\u0443.<br \/>  \u0415\u0441\u043b\u0438 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u044d\u0442\u043e\u0439 \u0440\u043e\u043b\u0438 \u0432\u044b\u0441\u0442\u0443\u043f\u0430\u0435\u0442 \u0447\u0435\u043b\u043e\u0432\u0435\u043a, \u0442\u043e \u0435\u0433\u043e \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c (end-user).<\/td>\n<td>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0447\u0435\u043b\u043e\u0432\u0435\u043a, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0441\u0432\u043e\u0438\u043c \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u043c \u0434\u0430\u043d\u043d\u044b\u043c, \u0445\u0440\u0430\u043d\u044f\u0449\u0438\u043c\u0441\u044f \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435.<\/td>\n<\/tr>\n<tr>\n<td>Resource server<br \/>  (\u0421\u0435\u0440\u0432\u0435\u0440 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432)<\/td>\n<td>\u0421\u0435\u0440\u0432\u0435\u0440, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0440\u0430\u0437\u043c\u0435\u0449\u0430\u044e\u0442\u0441\u044f \u0437\u0430\u0449\u0438\u0449\u0435\u043d\u043d\u044b\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b, \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044e\u0449\u0438\u0439 \u0438 \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0449\u0438\u0439 \u043d\u0430 \u0437\u0430\u0449\u0438\u0449\u0435\u043d\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043a \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0442\u043e\u043a\u0435\u043d\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 (access token).<\/td>\n<td>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u0435\u0440\u0432\u0435\u0440 KeyCloak, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0434\u0430\u043d\u043d\u044b\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0447\u0435\u0440\u0435\u0437 REST-\u0441\u0435\u0440\u0432\u0438\u0441 (UserInfo Endpoint)<\/td>\n<\/tr>\n<tr>\n<td>Client<br \/>  (\u041a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435)<\/td>\n<td>\u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0449\u0435\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u043e\u0442 \u0438\u043c\u0435\u043d\u0438 \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0430 \u0440\u0435\u0441\u0443\u0440\u0441\u0430 \u0438 \u0441 \u0435\u0433\u043e \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f. \u0422\u0435\u0440\u043c\u0438\u043d \u00ab\u043a\u043b\u0438\u0435\u043d\u0442\u00bb \u043d\u0435 \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u0435\u0442 \u043a\u0430\u043a\u0438\u0445-\u043b\u0438\u0431\u043e \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0432 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0435 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043b\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435, \u0440\u0430\u0431\u043e\u0447\u0435\u043c \u0441\u0442\u043e\u043b\u0435 \u0438\u043b\u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u0445).<\/td>\n<td>Web Application,\u00a0Desktop Native Application,\u00a0Mobile Native Application,\u00a0SPA App,\u00a0Javascript application<\/td>\n<\/tr>\n<tr>\n<td>Authorization server<br \/>  (\u0421\u0435\u0440\u0432\u0435\u0440 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438)<\/td>\n<td>\u0421\u0435\u0440\u0432\u0435\u0440, \u0432\u044b\u0434\u0430\u044e\u0449\u0438\u0439 \u043a\u043b\u0438\u0435\u043d\u0442\u0443 \u0442\u043e\u043a\u0435\u043d\u044b \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043f\u043e\u0441\u043b\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0430 \u0440\u0435\u0441\u0443\u0440\u0441\u0430 \u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438.<\/td>\n<td>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u0435\u0440\u0432\u0435\u0440 KeyCloak (\u0435\u0441\u043b\u0438 \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c \u043f\u0440\u043e <a href=\"https:\/\/www.keycloak.org\/\" rel=\"nofollow noopener noreferrer\">\u043e\u0442\u043a\u0440\u044b\u0442\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 KeyCloak<\/a>, \u0442\u043e \u043e\u043d \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0441\u0442\u0443\u043f\u0430\u0442\u044c \u043a\u0430\u043a \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432, \u0442\u0430\u043a \u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e. <\/p>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435 \u0438\u0437 OAuth:<br \/>  \u0421\u0435\u0440\u0432\u0435\u0440 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0442\u0435\u043c \u0436\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c, \u0447\u0442\u043e \u0438 \u0441\u0435\u0440\u0432\u0435\u0440 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432, \u0438\u043b\u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c. \u041e\u0434\u0438\u043d \u0441\u0435\u0440\u0432\u0435\u0440 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0434\u0430\u0432\u0430\u0442\u044c \u0442\u043e\u043a\u0435\u043d\u044b \u0434\u043e\u0441\u0442\u0443\u043f\u0430, \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u043c\u044b\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u043c\u0438 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432.<\/td>\n<\/tr>\n<tr>\n<td>Web application<br \/>  (\u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435)<\/td>\n<td>\u0412\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u2014 \u044d\u0442\u043e \u043a\u043e\u043d\u0444\u0438\u0434\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043b\u0438\u0435\u043d\u0442, \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c\u044b\u0439 \u043d\u0430 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0435. \u0412\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u044b \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043a\u043b\u0438\u0435\u043d\u0442\u0443 \u0447\u0435\u0440\u0435\u0437 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 HTML, \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c\u044b\u0439 \u0432 \u0410\u0433\u0435\u043d\u0442\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043d\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u043c \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0435\u043c \u0440\u0435\u0441\u0443\u0440\u0441\u0430. \u0423\u0447\u0435\u0442\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u0430, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043b\u044e\u0431\u043e\u0439 \u0442\u043e\u043a\u0435\u043d \u0434\u043e\u0441\u0442\u0443\u043f\u0430, \u0432\u044b\u0434\u0430\u043d\u043d\u044b\u0439 \u043a\u043b\u0438\u0435\u043d\u0442\u0443, \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u043d\u0430 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0438 \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0443 \u0440\u0435\u0441\u0443\u0440\u0441\u0430.<\/td>\n<td>\u0422\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u043e\u0435 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432 \u043a\u043b\u0438\u0435\u043d\u0442-\u0441\u0435\u0440\u0432\u0435\u0440\u043d\u043e\u0439 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435.<\/td>\n<\/tr>\n<tr>\n<td>User-agent-based application<\/td>\n<td>\u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u0430\u0433\u0435\u043d\u0442\u0430 \u2014 \u044d\u0442\u043e \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 \u043a\u043b\u0438\u0435\u043d\u0442, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0438\u0439 \u043a\u043e\u0434 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442\u0441\u044f \u0441 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0432 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u043c \u0430\u0433\u0435\u043d\u0442\u0435 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u0435\u0431-\u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435) \u043d\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u043c \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0435\u043c \u0440\u0435\u0441\u0443\u0440\u0441\u0430. \u0423\u0447\u0435\u0442\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043b\u0435\u0433\u043a\u043e\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b (\u0438 \u0447\u0430\u0441\u0442\u043e \u0432\u0438\u0434\u043d\u044b) \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0443 \u0440\u0435\u0441\u0443\u0440\u0441\u0430.<\/td>\n<td>\n<ul>\n<li>SPA App,\u00a0<\/li>\n<li><a href=\"https:\/\/tools.ietf.org\/html\/draft-ietf-oauth-browser-based-apps-06#section-6.2\" rel=\"nofollow noopener noreferrer\">Javascript application with a backend<\/a> (\u0447\u0430\u0441\u0442\u043d\u044b\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439: Angular front-end \u0441 .NET backend, \u0438\u043b\u0438\u00a0 React front-end \u0441 Spring Boot backend.)\u00a0<\/li>\n<li>JavaScript Applications without a Backend<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<tr>\n<td>Native application<\/td>\n<td>\u041b\u043e\u043a\u0430\u043b\u044c\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u2014 \u044d\u0442\u043e \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 \u043a\u043b\u0438\u0435\u043d\u0442, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0439 \u043d\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u043c \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0435\u043c \u0440\u0435\u0441\u0443\u0440\u0441\u0430. \u0414\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430 \u0438 \u0443\u0447\u0435\u0442\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0443 \u0440\u0435\u0441\u0443\u0440\u0441\u0430. \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u043b\u044e\u0431\u044b\u0435 \u0443\u0447\u0435\u0442\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u0430, \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u0435 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u044b.<\/td>\n<td>Desktop Native Application,\u00a0Mobile Native Application<br \/>  \u041d\u0430 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u0445, \u0432\u043a\u043b\u044e\u0447\u0430\u044f: \u043d\u0430\u0441\u0442\u043e\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440, \u0442\u0435\u043b\u0435\u0444\u043e\u043d, \u043f\u043b\u0430\u043d\u0448\u0435\u0442 \u0438 \u0442. \u0434.\u00a0<\/td>\n<\/tr>\n<tr>\n<td>Application without an authentification flow<\/td>\n<td>\u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043d\u0435 \u0443\u0447\u0430\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0435 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438\/\u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439. \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0449\u0438\u0449\u0435\u043d\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u043c \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432.<\/td>\n<td>\u0411\u044d\u043a-\u0447\u0430\u0441\u0442\u044c \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0432\u043d\u0435\u0448\u043d\u044f\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430-\u043a\u043b\u0438\u0435\u043d\u0442, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0449\u0430\u044f \u0437\u0430\u043f\u0440\u043e\u0441 \u043a \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u044b.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u0435\u043c \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0438\u044e \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437 \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u0435\u0435.   <\/div>\n<\/p><\/div>\n<h2>\u041a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0432\u0437\u0433\u043b\u044f\u0434 \u043d\u0430 OAuth 2.0<\/h2>\n<p>  \u0418\u0437\u0443\u0447\u0430\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442, \u043c\u043e\u0436\u043d\u043e \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u0442\u044c\u0441\u044f \u0441 \u0440\u044f\u0434\u043e\u043c \u043d\u0435\u043e\u0434\u043d\u043e\u0437\u043d\u0430\u0447\u043d\u044b\u0445 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0439, \u0447\u0442\u043e, \u0432 \u043f\u0440\u043e\u0447\u0435\u043c, \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0440\u0435\u0434\u043a\u0438\u043c \u044f\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u0437\u0430\u0447\u0430\u0441\u0442\u0443\u044e \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438. \u041f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0441\u0435\u0439\u0447\u0430\u0441 \u0438 \u0437\u0430\u043d\u044f\u0442\u044c\u0441\u044f \u0432\u044b\u044f\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u044d\u0442\u0438\u0445 \u043d\u0435\u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0439. \u0425\u043e\u0442\u044f \u043a\u043e\u043c\u0443-\u0442\u043e \u044f \u043c\u043e\u0433\u0443 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u0438\u0437\u043b\u0438\u0448\u043d\u0435 \u043f\u0440\u0438\u0434\u0438\u0440\u0447\u0438\u0432\u043e\u0439. \u042f \u044d\u0442\u043e\u0433\u043e \u043d\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0430\u044e \u0438 \u0431\u0443\u0434\u0443 \u0440\u0430\u0434\u0430 \u0443\u0441\u043b\u044b\u0448\u0430\u0442\u044c \u0432\u0441\u0442\u0440\u0435\u0447\u043d\u043e\u0435 \u043c\u043d\u0435\u043d\u0438\u0435 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044f.<\/p>\n<h3><a href=\"https:\/\/tools.ietf.org\/html\/rfc6749#section-4.1\" rel=\"nofollow noopener noreferrer\">Authorization Code Grant<\/a><\/h3>\n<p>  \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0435\u0440\u0432\u044b\u0439 \u0438\u0437 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u0445 \u0432 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u0441 \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430: Authorization Code Grant. \u0412 \u0441\u0430\u043c\u043e\u043c \u043d\u0430\u0447\u0430\u043b\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430 \u0435\u0433\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e\u0442 \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f <a href=\"https:\/\/tools.ietf.org\/html\/rfc6749#section-1.2\" rel=\"nofollow noopener noreferrer\">\u0441 \u043e\u0431\u0449\u0438\u043c, \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u044e\u0449\u0438\u043c \u0432\u0441\u0435 \u043f\u043e\u0442\u043e\u043a\u0438<\/a> \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c. \u0410 \u0434\u0430\u043b\u0435\u0435 \u0443\u0436\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u0436\u0434\u044b\u0439 \u0438\u043d\u0434\u0438\u0432\u0438\u0434\u0443\u0430\u043b\u044c\u043d\u043e \u0438, \u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438, <a href=\"https:\/\/tools.ietf.org\/html\/rfc6749#section-4.1\" rel=\"nofollow noopener noreferrer\">Authorization Code Grant (from the OAuth 2.0 Authorization Framework)<\/a>. \u041d\u043e \u0447\u0442\u043e \u043c\u044b \u0432\u0438\u0434\u0438\u043c:  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u041b\u0435\u043d\u044c &#8212; \u0434\u0432\u0438\u0433\u0430\u0442\u0435\u043b\u044c \u043f\u0440\u043e\u0433\u0440\u0435\u0441\u0441\u0430?<\/b>                         <\/p>\n<div class=\"spoiler_text\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ng\/ay\/sa\/ngaysa6gfiiurbk7qy69ok2vagw.png\">  <\/div>\n<\/p><\/div>\n<p>  \u041d\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u043f\u043e\u0442\u043e\u043a\u0430 Authorization Code Grant \u043f\u043e\u0447\u0435\u043c\u0443-\u0442\u043e \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0440\u0435\u0441\u0443\u0440\u0441\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440. \u041d\u0430\u0432\u0435\u0440\u043d\u043e\u0435, \u0443 \u043c\u043d\u043e\u0433\u0438\u0445 \u043f\u043e\u0442\u0440\u0435\u0431\u0438\u0442\u0435\u043b\u0435\u0439 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430 \u043c\u043e\u0436\u0435\u0442 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0443\u0442\u044c \u0432\u043e\u043f\u0440\u043e\u0441, \u0447\u0442\u043e \u0436\u0435 \u0434\u0435\u043b\u0430\u0442\u044c \u0434\u0430\u043b\u044c\u0448\u0435 \u0441 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u043c \u0442\u043e\u043a\u0435\u043d\u043e\u043c? <br \/>  \u041d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u043b\u0430\u0441\u044c \u0441 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439, \u043a\u043e\u0433\u0434\u0430 \u0441\u0430\u043c \u043f\u043e\u0442\u043e\u043a \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u043b\u0438 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e, \u0430 \u0434\u0430\u043b\u0435\u0435 \u0432\u0441\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043a \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c \u043f\u0440\u043e\u0441\u0442\u043e \u0448\u043b\u0438 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0438\u0437 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430 (User-Agent) \u0431\u0435\u0437 \u043a\u0430\u043a\u043e\u0433\u043e-\u043b\u0438\u0431\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0442\u043e\u043a\u0435\u043d\u0430 \u0434\u043b\u044f \u0437\u0430\u0449\u0438\u0442\u044b. \u041b\u0438\u0431\u043e \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0442\u043e\u043a\u0435\u043d\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0442 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 (Client) \u043f\u0440\u043e\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u043b\u0441\u044f \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u0441\u043d\u0430\u0447\u0430\u043b\u0430, \u0430 \u0438\u0437 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430 (User-Agent) \u0448\u043b\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043a \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c. \u0422\u043e\u043a\u0435\u043d, \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0431\u044b\u043b\u043e \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 \u0441\u0430\u043c\u043e\u043c \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435.<br \/>  \u0412 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0435 \u0432 \u0441\u0430\u043c\u043e\u043c \u043d\u0430\u0447\u0430\u043b\u0435 \u0435\u0441\u0442\u044c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435, \u043a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u043a\u0435\u043d \u0432 \u043e\u0431\u0449\u0435\u043c <a href=\"https:\/\/tools.ietf.org\/html\/rfc6749#section-1.2\" rel=\"nofollow noopener noreferrer\">\u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u043f\u043e\u0442\u043e\u043a\u0430<\/a>. \u041d\u043e \u043a\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0430, \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u044d\u0442\u043e\u0439 \u0434\u0435\u0442\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u0432 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0438 Authorization Code Grant.<br \/>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0440\u0435\u0441\u0443\u0440\u0441\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u0434\u043b\u044f \u0443\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u043d\u0435\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u0432 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043f\u043e\u0442\u043e\u043a\u0430 (\u043d\u0430 \u0440\u0438\u0441\u0443\u043d\u043a\u0430\u0445 \u044f \u0431\u0443\u0434\u0443 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u044b \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u043c\u0438):  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">Authorization Code Grant with a Resource Server (Resource Server != Authorization Server)<\/b>                         <\/p>\n<div class=\"spoiler_text\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/0x\/ln\/v3\/0xlnv3nmb6km9mhqz6c49pkngmk.png\">  <\/div>\n<\/p><\/div>\n<p>  \u0422\u0430\u043a\u0436\u0435 \u0441\u0442\u043e\u0438\u0442 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u043a\u043b\u0438\u0435\u043d\u0442-\u0441\u0435\u0440\u0432\u0435\u0440\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043a Resource Server \u0432\u043d\u0443\u0442\u0440\u0438 \u043e\u0434\u043d\u043e\u0439 \u0437\u0430\u0449\u0438\u0449\u0435\u043d\u043d\u043e\u0439 \u0441\u0435\u0442\u0438, \u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 Access \u0442\u043e\u043a\u0435\u043d\u0430 \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c. \u0417\u0430\u043f\u0440\u043e\u0441\u044b \u0431\u0443\u0434\u0443\u0442 \u0437\u0430\u0449\u0438\u0449\u0435\u043d\u044b \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u043e\u0434\u043d\u043e\u0439 \u0441\u0435\u0442\u0438, \u0430 Authorization Code Grant \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.<\/p>\n<h3><a href=\"https:\/\/tools.ietf.org\/html\/rfc6749#section-4.2\" rel=\"nofollow noopener noreferrer\">Implicit Grant <\/a><\/h3>\n<p>  \u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 Implicit Grant \u0438\u0437 OAuth 2.0 \u044f \u043d\u0435 \u0441\u0442\u0430\u043d\u0443 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u044c \u0437\u0434\u0435\u0441\u044c, \u0441 \u043d\u0438\u043c \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u043f\u043e <a href=\"https:\/\/tools.ietf.org\/html\/rfc6749#section-4.2\" rel=\"nofollow noopener noreferrer\">\u0441\u0441\u044b\u043b\u043a\u0435<\/a>.<br \/>  \u0418\u0437\u0443\u0447\u0430\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e <a href=\"https:\/\/tools.ietf.org\/html\/rfc6749#section-4.2\" rel=\"nofollow noopener noreferrer\">\u043f\u043e\u0442\u043e\u043a Implicit Grant<\/a>, \u0438\u0441\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c \u0437\u0430\u0434\u0430\u0447\u0438, \u043d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u043c\u043e\u0436\u0435\u0442 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0444\u0440\u0430\u0437\u0443 \u0432 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430:   <\/p>\n<blockquote><p>\u00abThese clients are typically implemented in a browser using a scripting language such as JavaScript.\u00bb<\/p><\/blockquote>\n<p>   \u2014 \u00ab\u0410\u0433\u0430! \u041a\u043b\u0438\u0435\u043d\u0442-\u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0443\u0445\u043e\u0434\u044f\u0442 \u0432 \u043f\u0440\u043e\u0448\u043b\u043e\u0435, \u0437\u043d\u0430\u0447\u0438\u0442 Authorization Code Grant \u043d\u0430\u043c \u043d\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442! \u0414\u0430\u0432\u0430\u0439\u0442\u0435 Implicit Grant \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c!\u00bb \u2014 \u043d\u0430\u0432\u0435\u0440\u043d\u043e\u0435, \u043f\u043e\u0434\u0443\u043c\u0430\u043b \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a \u0438\u043b\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a.<br \/>  \u0427\u0438\u0442\u0430\u0435\u043c \u0434\u0430\u043b\u044c\u0448\u0435.  <\/p>\n<blockquote><p> \u00abBecause the access token is encoded into the redirection URI, it may be exposed to the resource owner and other applications residing on the same device.\u00bb<\/p><\/blockquote>\n<p>   \u2014 \u00ab\u0415\u0449\u0435 \u043f\u0440\u043e\u0449\u0435! \u041d\u0438\u043a\u0430\u043a\u0438\u0445 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u0438 \u0437\u0430\u043f\u0443\u0442\u0430\u043d\u043d\u044b\u0445 \u0440\u0435\u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0432!\u00bb \u2014 \u0442\u043e\u0436\u0435, \u043d\u0430\u0432\u0435\u0440\u043d\u043e\u0435, \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0434\u0443\u043c\u0430\u0442\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0438\u043b\u0438 \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a? \u0412\u0435\u0434\u044c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442 \u0441\u0430\u043c \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u0442 \u0442\u0430\u043a \u0434\u0435\u043b\u0430\u0442\u044c.<br \/>  \u041d\u0430\u0434\u043e \u0447\u0438\u0442\u0430\u0442\u044c \u0434\u0430\u043b\u044c\u0448\u0435? \u0412\u0440\u043e\u0434\u0435, \u0438 \u0442\u0430\u043a \u0432\u0441\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u043e\u2026<br \/>  \u0410 \u0434\u0430\u043b\u044c\u0448\u0435 \u043c\u044b \u0443\u0432\u0438\u0434\u0438\u043c \u0432\u043e\u0442 \u0442\u0430\u043a\u0443\u044e \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u044e:  <\/p>\n<blockquote><p>\u00abSee Sections 10.3 and <a href=\"https:\/\/tools.ietf.org\/html\/rfc6749#section-10.16\" rel=\"nofollow noopener noreferrer\">10.16<\/a> for important security considerations when using the implicit grant.\u00bb<\/p><\/blockquote>\n<p>  \u0415\u0441\u043b\u0438 \u043c\u044b \u043f\u0440\u043e\u0439\u0434\u0435\u043c \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435 <a href=\"https:\/\/tools.ietf.org\/html\/rfc6749#section-10.16\" rel=\"nofollow noopener noreferrer\">10.16<\/a>, \u0442\u043e \u043f\u0435\u0440\u0432\u043e\u0435, \u0447\u0442\u043e \u043c\u044b \u043f\u0440\u043e\u0447\u0442\u0435\u043c, \u0431\u0443\u0434\u0435\u0442 \u044d\u0442\u043e:  <\/p>\n<blockquote><p>&quot; For public clients using implicit flows, this specification does not provide any method for the client to determine what client an access token was issued to.&quot;<\/p><\/blockquote>\n<p>  \u0410 \u0437\u0430\u0442\u0435\u043c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0441 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u044f\u043c\u0438, \u043a\u0430\u043a \u043c\u044b \u043c\u043e\u0433\u043b\u0438 \u0431\u044b \u0441\u0430\u043c\u0438 \u043e \u0441\u0435\u0431\u0435 \u043f\u043e\u0437\u0430\u0431\u043e\u0442\u0438\u0442\u044c\u0441\u044f. \u0422.\u0435. \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c, \u0447\u0442\u043e \u043a\u0430\u043a \u0431\u044b \u043f\u043e\u0442\u043e\u043a \u0432 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0435 \u043e\u043f\u0438\u0441\u0430\u043d, \u043d\u043e \u0435\u0433\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043d\u0438\u0447\u0435\u0433\u043e \u043e\u0431\u0449\u0435\u0433\u043e \u0441 \u00ab\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c\u044e\u00bb \u043d\u0435 \u0438\u043c\u0435\u0435\u0442. \u0422.\u0435. \u0441\u0430\u043c\u0438 \u043f\u043e \u0441\u0435\u0431\u0435 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c\u044b\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0435 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0435 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u044e\u0442 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0433\u043e \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f. \u041c\u043e\u0433\u0443\u0442 \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043c\u0435\u0440\u044b \u043f\u043e \u0435\u0435 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438.<br \/>  <b>\u0418 OAuth 2.0 \u2014 \u044d\u0442\u043e \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u0440\u043e \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c<\/b>, \u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0443\u0441\u0442\u043e\u044f\u0432\u0448\u0435\u0435\u0441\u044f \u043c\u043d\u0435\u043d\u0438\u0435. \u041d\u043e \u0432\u0441\u0435 \u043b\u0438 \u0447\u0438\u0442\u0430\u044e\u0442 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438 \u0432 \u0441\u043d\u043e\u0441\u043a\u0430\u0445?<\/p>\n<h3><a href=\"https:\/\/tools.ietf.org\/html\/rfc6749#section-4.3\" rel=\"nofollow noopener noreferrer\">Resource Owner Password Credentials Grant<\/a><\/h3>\n<p>  \u0412\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 <a href=\"https:\/\/tools.ietf.org\/html\/rfc6749#section-4.3\" rel=\"nofollow noopener noreferrer\">Resource Owner Password Credentials Grant<\/a> \u043a\u0430\u0436\u0435\u0442\u0441\u044f \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u044b\u043c.<br \/>  \u041d\u043e \u0432 \u0441\u0430\u043c\u043e\u043c \u043f\u0430\u0440\u0430\u0433\u0440\u0430\u0444\u0435 \u043d\u0430\u043c \u0441\u0440\u0430\u0437\u0443 \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438:  <\/p>\n<blockquote><p>\u00abThe authorization server should take special care when enabling this grant type and only allow it when other flows are not viable.\u00bb<\/p><\/blockquote>\n<p>  \u0414\u0443\u043c\u0430\u044e, \u044d\u0442\u0430 \u0444\u0440\u0430\u0437\u0430 \u043c\u043d\u043e\u0433\u0438\u0445 \u0443\u0431\u0435\u0440\u0435\u0433\u043b\u0430 \u043e\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u0442\u043e\u043a\u0430 \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435. \u041d\u0435 \u0431\u0443\u0434\u0435\u043c \u0434\u043e\u043b\u0433\u043e \u0437\u0430\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 Resource Owner Password Credentials Grant.<\/p>\n<h3><a href=\"https:\/\/tools.ietf.org\/html\/rfc6749#section-4.4\" rel=\"nofollow noopener noreferrer\">Client Credentials Grant<\/a><\/h3>\n<p>  \u0414\u0430\u043d\u043d\u044b\u0439 \u043f\u043e\u0442\u043e\u043a \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u0435\u0442 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 (Client) \u0441 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c (Authorization Server) \u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c \u043e\u0431\u043c\u0435\u043d\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u043e\u0433\u043e \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430 (Client ID -\u043b\u043e\u0433\u0438\u043d\u0430) \u0438 \u0441\u0435\u043a\u0440\u0435\u0442\u0430 (Secret \u2014 \u043f\u0430\u0440\u043e\u043b\u044f \u0434\u043b\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u044b) \u043d\u0430 \u0442\u043e\u043a\u0435\u043d \u0434\u043e\u0441\u0442\u0443\u043f\u0430 (access token).   <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">Client Credentials:<\/b>                         <\/p>\n<div class=\"spoiler_text\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/h7\/is\/nt\/h7isntyltgxqdijtm0nc3ybfoga.png\">  <\/div>\n<\/p><\/div>\n<p>  \u041d\u043e \u0437\u0434\u0435\u0441\u044c \u0442\u043e \u0443\u0436 \u043d\u0435 \u043c\u043e\u0433\u043b\u0438 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0430\u043f\u0443\u0442\u0430\u0442\u044c, \u043f\u0440\u0430\u0432\u0434\u0430?<br \/>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0447\u0438\u0442\u0430\u0442\u044c \u0434\u0430\u043b\u044c\u0448\u0435. <br \/>  \u0412 \u0447\u0430\u0441\u0442\u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f <a href=\"https:\/\/tools.ietf.org\/html\/rfc6749#section-4.4.3\" rel=\"nofollow noopener noreferrer\">\u043e\u0442\u0432\u0435\u0442\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0443<\/a> \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u0442\u0430\u043a\u0443\u044e \u0444\u0440\u0430\u0437\u0443:  <\/p>\n<blockquote><p>\u00abA refresh token SHOULD NOT be included.\u00bb<\/p><\/blockquote>\n<p>  \u041d\u043e \u0447\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442 \u00ab\u043d\u0435 \u0441\u043b\u0435\u0434\u0443\u0435\u0442\u00bb? \u0422.\u0435. \u0432\u0440\u043e\u0434\u0435 \u043a\u0430\u043a, \u0438 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c, \u0442.\u0435. \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438 \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u043d\u0430\u043b\u0438\u0447\u0438\u044f? \u0410 \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u043c\u044b \u0438\u043c\u0435\u0435\u043c, \u0447\u0442\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0442\u0441\u044f \u043f\u043e OAuth 2.0, \u0432\u044b\u043d\u0443\u0436\u0434\u0435\u043d\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u0443\u044e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c, \u0442\u0430\u043a \u043a\u0430\u043a \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043e\u043c \u043e\u043d\u0430 \u043d\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f.<br \/>  \u0418 \u0437\u0434\u0435\u0441\u044c \u043d\u0430\u0434\u043e \u0432\u0441\u043f\u043e\u043c\u043d\u0438\u0442\u044c, \u0434\u043b\u044f \u0447\u0435\u0433\u043e, \u0432 <a href=\"https:\/\/tools.ietf.org\/html\/rfc6749#section-1.4\" rel=\"nofollow noopener noreferrer\">\u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435, \u0431\u044b\u043b\u0438 \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u043d\u044b<\/a> \u00abRefresh token\u00bb \u0438 \u00abAccess token\u00bb. <br \/>  \u0423 Access token \u0435\u0441\u0442\u044c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u044b\u0439 \u0441\u0440\u043e\u043a \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f, \u0438 \u043a\u043e\u0433\u0434\u0430 \u043e\u043d \u0438\u0441\u0442\u0435\u043a\u0430\u0435\u0442, \u043a\u043b\u0438\u0435\u043d\u0442 (Client) \u0432 \u043e\u0431\u043c\u0435\u043d \u043d\u0430 \u00abRefresh token\u00bb \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442 \u043d\u043e\u0432\u044b\u0439 \u00abAccess token\u00bb. \u00abRefresh token\u00bb \u0432\u0441\u0435\u0433\u0434\u0430 \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435, \u043b\u0438\u0431\u043e \u0441 \u043a\u0430\u0436\u0434\u044b\u043c \u043d\u043e\u0432\u044b\u043c \u00abAccess token\u00bb \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u0438 \u043d\u043e\u0432\u044b\u0439 \u00abRefresh token\u00bb \u0434\u043e\u043b\u0436\u0435\u043d, \u0447\u0442\u043e \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u0435\u0435, \u043d\u043e \u0441\u043b\u043e\u0436\u043d\u0435\u0435 \u0432 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438.<br \/>  \u0415\u0441\u043b\u0438 \u0432\u0435\u0440\u043d\u0443\u0442\u044c\u0441\u044f \u043a \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044e \u043f\u043e\u0442\u043e\u043a\u0430 Authorization Code Grant, \u0442\u043e \u0442\u0430\u043c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0440\u0435\u0430\u043b\u044c\u043d\u0443\u044e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f: \u0432 \u0441\u043b\u0443\u0447\u0430\u0435, \u043a\u043e\u0433\u0434\u0430 \u043f\u043e \u043a\u0430\u043a\u0438\u043c-\u043b\u0438\u0431\u043e \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u043c \u0437\u043b\u043e\u0443\u043c\u044b\u0448\u043b\u0435\u043d\u043d\u0438\u043a\u0443 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0443\u043a\u0440\u0430\u0441\u0442\u044c Access token \u0432 \u043e\u0431\u043c\u0435\u043d \u043d\u0430 \u043a\u043e\u0434 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 (\u044d\u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0442\u0430\u043a \u043a\u0430\u043a \u043a\u043e\u0434 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e \u0447\u0435\u0440\u0435\u0437 \u043e\u0431\u043c\u0435\u043d \u0441 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043e\u043c (\u0438\u043b\u0438 \u0434\u0440\u0443\u0433\u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u043c \u0430\u0433\u0435\u043d\u0442\u043e\u043c), \u0430 Client ID \u0438 Secret \u043f\u043e \u043a\u0430\u043a\u0438\u043c-\u0442\u043e \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u043c \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043f\u0440\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0435 \u0442\u043e\u043a\u0435\u043d\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 (\u0438\u043b\u0438 \u0438\u0445 \u0441\u043c\u043e\u0433\u043b\u0438 \u0443\u043a\u0440\u0430\u0441\u0442\u044c \u0440\u0430\u043d\u0435\u0435), \u0442\u043e \u0438\u0437-\u0437\u0430 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043f\u0435\u0440\u0438\u043e\u0434\u0430 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f Access token, \u0443 \u0437\u043b\u043e\u0443\u043c\u044b\u0448\u043b\u0435\u043d\u043d\u0438\u043a\u0430 \u0431\u0443\u0434\u0435\u0442 \u0441\u0442\u043e\u043b\u044c\u043a\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0430\u0432\u0440\u0435\u0434\u0438\u0442\u044c, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 Access token, \u0438 \u043f\u043e\u043a\u0430 \u0432 \u043e\u0431\u043c\u0435\u043d \u043d\u0430 Refresh token \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0448\u0435\u043d \u043d\u043e\u0432\u044b\u0439 Access token \u0434\u043e\u0432\u0435\u0440\u0435\u043d\u043d\u044b\u043c \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u043c.<\/p>\n<p>  <i>\u0418 \u0434\u0430, Authorization Code Grant \u0442\u043e\u0436\u0435 \u043d\u0435 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442 \u043f\u043e\u043b\u043d\u043e\u0439 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438, \u0445\u043e\u0442\u044f \u043f\u0440\u0438 \u0435\u0433\u043e \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438, \u0437\u043b\u043e\u0443\u043c\u044b\u0448\u043b\u0435\u043d\u043d\u0438\u043a\u0443 \u043d\u0435 \u0442\u0430\u043a \u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u043a\u043b\u0438\u043d\u0438\u0442\u044c\u0441\u044f \u0432 \u043f\u043e\u0442\u043e\u043a \u0438 \u0447\u0442\u043e-\u0442\u043e \u0443\u043a\u0440\u0430\u0441\u0442\u044c \u0438\u043b\u0438 \u0441\u043b\u043e\u043c\u0430\u0442\u044c, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0435\u0449\u0435 \u0438 \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0438\u0445 \u0441\u0435\u0441\u0441\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u043e\u0431\u044b\u0447\u043d\u043e \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438, \u0438 \u043e \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u044f \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u044e \u0437\u0434\u0435\u0441\u044c.<\/i><\/p>\n<p>  \u0410 \u0435\u0441\u043b\u0438 \u043c\u044b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 Client Credentials Flow, \u0442\u043e \u0437\u0434\u0435\u0441\u044c, \u0435\u0441\u043b\u0438 \u0437\u043b\u043e\u0443\u043c\u044b\u0448\u043b\u0435\u043d\u043d\u0438\u043a \u0443\u043a\u0440\u0430\u0434\u0435\u0442 Client ID \u0438 Secret, \u0442\u043e Refresh token \u043d\u0430\u043c \u043d\u0435 \u043d\u0430\u0432\u0440\u0435\u0434\u0438\u0442, \u043d\u043e \u0443\u0436\u0435 \u043d\u0438\u043a\u0430\u043a \u0438 \u043d\u0435 \u043f\u043e\u043c\u043e\u0436\u0435\u0442. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u0438\u043c\u0435\u0435\u043c \u0438\u0437\u0431\u044b\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u0438 \u0438\u0437\u043b\u0438\u0448\u043d\u044e\u044e \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f\u0445.<\/p>\n<h2>OAuth 2.0 -&gt; OAuth 2.1. \u0427\u0442\u043e \u0434\u0430\u043b\u044c\u0448\u0435?<\/h2>\n<p>  \u0418\u0442\u0430\u043a, \u043c\u044b \u0441 \u043d\u0435\u043a\u043e\u0439 \u0434\u043e\u043b\u0435\u0439 \u0441\u043a\u0435\u043f\u0442\u0438\u0446\u0438\u0437\u043c\u0430 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u043f\u043e\u0442\u043e\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u043c \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a OAuth 2.0. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0436\u0435 \u0442\u0435\u043f\u0435\u0440\u044c \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u0438 \u043e\u0442\u0432\u0435\u0447\u0430\u0442\u044c \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441, \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0432 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0435 \u043a \u0441\u0430\u043c\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435. \u0412 \u043a\u0430\u043a\u043e\u043c \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u0438 \u043a\u0430\u043a \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u0435\u0442\u0441\u044f OAuth 2.0?<br \/>  \u0417\u0430 \u043f\u0435\u0440\u0438\u043e\u0434, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0430 OAuth 2.0 \u0438\u0437 \u0447\u0435\u0440\u043d\u043e\u0432\u0438\u043a\u0430 \u0432 \u0441\u0442\u0430\u0442\u0443\u0441 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430, \u0434\u043e \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u043b\u0438 \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u043d\u0430\u0434 \u043e\u0448\u0438\u0431\u043a\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u044f\u0432\u043b\u044f\u043b\u0430\u0441\u044c \u0432 \u0441\u0432\u0435\u0442 \u0432 \u0432\u0438\u0434\u0435 \u043d\u043e\u0432\u044b\u0445 RFC \u0438 \u0447\u0435\u0440\u043d\u043e\u0432\u0438\u043a\u043e\u0432 \u0432 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043a OAuth 2.0:  <\/p>\n<ul>\n<li>OAuth 2.0 for Native Apps (<a href=\"https:\/\/tools.ietf.org\/html\/rfc8252\" rel=\"nofollow noopener noreferrer\">RFC 8252<\/a>), <\/li>\n<li>Proof Key for Code Exchange (<a href=\"https:\/\/tools.ietf.org\/html\/rfc7636\" rel=\"nofollow noopener noreferrer\">RFC 7636<\/a>), <\/li>\n<li><a href=\"https:\/\/tools.ietf.org\/html\/draft-ietf-oauth-browser-based-apps-07\" rel=\"nofollow noopener noreferrer\">OAuth for Browser-Based Apps<\/a>, <\/li>\n<li><a href=\"https:\/\/tools.ietf.org\/html\/draft-ietf-oauth-security-topics-16\" rel=\"nofollow noopener noreferrer\">OAuth 2.0 Security Best Current Practice.<\/a><\/li>\n<\/ul>\n<p>  \u0418\u0442\u043e\u0433\u043e\u043c \u043f\u043e\u0447\u0442\u0438 \u0434\u0435\u0441\u044f\u0442\u0438\u043b\u0435\u0442\u043d\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u0442\u0430\u043b\u043e \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u0440\u0430\u0444\u0442\u0430 <a href=\"https:\/\/tools.ietf.org\/html\/draft-ietf-oauth-v2-1-00\" rel=\"nofollow noopener noreferrer\">OAuth 2.1, <\/a>\u043f\u0435\u0440\u0438\u043e\u0434 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0438\u0441\u0442\u0435\u043a\u0430\u0435\u0442 31.01.2021. <br \/>  <i><b>\u0418 \u0437\u0434\u0435\u0441\u044c \u0438\u043d\u0442\u0440\u0438\u0433\u0443\u044e\u0449\u0438\u0439 \u043d\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432\u043e\u043f\u0440\u043e\u0441: \u00ab\u0431\u0443\u0434\u0435\u0442 \u043b\u0438 \u043f\u0440\u043e\u0434\u043b\u0435\u043d \u0434\u0440\u0430\u0444\u0442 \u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u0442 \u0432 \u0441\u0442\u0430\u0442\u0443\u0441 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430?\u00bb<\/b><\/i><br \/>  \u0414\u0440\u0430\u0444\u0442 \u043a\u043e\u043d\u0441\u043e\u043b\u0438\u0434\u0438\u0440\u043e\u0432\u0430\u043b \u0432 \u0441\u0435\u0431\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0437\u0434\u043d\u0438\u0445 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0439. \u041d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0437\u043d\u0430\u0447\u0438\u043c\u044b\u0435 \u0438\u0437 \u043d\u0438\u0445:<\/p>\n<p>  <b>(1)<\/b> \u041f\u043e\u0442\u043e\u043a\u0438 Implicit grant (response_type=token) \u0438 Resource Owner Password Credentials \u0438\u0441\u043a\u043b\u044e\u0447\u0430\u044e\u0442\u0441\u044f \u0438\u0437 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430.  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0412\u044b\u0434\u0435\u0440\u0436\u043a\u0430 \u0438\u0437 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044f:<\/b>                         <\/p>\n<div class=\"spoiler_text\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ku\/en\/pg\/kuenpg8fbh-cnfaw5dq__ezezsm.png\">  <\/div>\n<\/p><\/div>\n<p>  <b>(2)<\/b> \u0410uthorization code grant \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u043b\u0438 \u043a\u043e\u0434\u043e\u043c PKCE (<a href=\"https:\/\/tools.ietf.org\/html\/rfc7636\" rel=\"nofollow noopener noreferrer\">RFC7636<\/a>) \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0447\u0442\u043e \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0410uthorization code grant \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u044d\u0442\u043e\u0439 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0435\u0439 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0430 PKCE;  <\/p>\n<blockquote><p>Clients MUST use \u00abcode_challenge\u00bb and \u00abcode_verifier\u00bb and authorization servers MUST enforce their use except under the conditions described in Section 9.8. In this case, using and enforcing \u00abcode_challenge\u00bb and \u00abcode_verifier\u00bb as described in the following is still RECOMMENDED.<\/p><\/blockquote>\n<p>  <\/p>\n<blockquote><p> Clients MUST prevent injection (replay) of authorization codes into the authorization response by attackers. To this end, using \u00abcode_challenge\u00bb and \u00abcode_verifier\u00bb is REQUIRED for clients and authorization servers MUST enforce their use, unless both of the following criteria are met:<br \/>   * The client is a confidential or credentialed client.<\/p>\n<p>  * In the specific deployment and the specific request, there is reasonable assurance for authorization server that the client implements the OpenID Connect \u00abnonce\u00bb mechanism properly.  <\/p><\/blockquote>\n<p>  <b>(3)<\/b> Redirect URIs \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u0443\u0434\u0443\u0442 \u0432\u0441\u0435\u0433\u0434\u0430 \u044f\u0432\u043d\u043e \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435.<br \/>  <b>(4)<\/b> Refresh \u0442\u043e\u043a\u0435\u043d\u044b \u0434\u043b\u044f \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0445 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u0434\u043e\u043b\u0436\u043d\u044b \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0442\u044c\u0441\u044f, \u043b\u0438\u0431\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0435 \u0431\u043e\u043b\u0435\u0435 1 \u0440\u0430\u0437\u0430.<br \/>  \u0421 \u0443\u0447\u0435\u0442\u043e\u043c <b>(1)<\/b> \u0438 <b>(2)<\/b>, \u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0435\u0433\u043e \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f, \u043d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u0437\u0430\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u0435\u0442 Proof Key for Code Exchange \u0441\u0435\u0439\u0447\u0430\u0441. <br \/>  \u041a\u0430\u043a \u043c\u044b \u0438 \u0433\u043e\u0432\u043e\u0440\u0438\u043b\u0438 \u0432\u044b\u0448\u0435, \u0432\u0441\u0435 \u0447\u0430\u0448\u0435 \u043c\u044b \u0443\u0436\u0435 \u043e\u0442\u0445\u043e\u0434\u0438\u043c \u043e\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043f\u0440\u043e\u0432\u0435\u0440\u0435\u043d\u043d\u044b\u0445 \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u043a\u043b\u0438\u0435\u043d\u0442-\u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0445 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440 (\u0445\u043e\u0442\u044f \u044f \u0441\u0430\u043c\u0430 \u043f\u0440\u0438\u0437\u044b\u0432\u0430\u044e \u0432\u0441\u0435\u0433\u0434\u0430 \u043d\u0435 \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c \u0437\u0430 \u043c\u043e\u0434\u043e\u0439, \u0430 \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438). \u0418 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 RFC \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e\u0442 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u043d\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0438\u0440\u0443\u044e\u0449\u0435\u0439\u0441\u044f \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438.<br \/>  \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u0432 OAuth 2.1 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0438\u0441\u044c, \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u043b\u0438\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043a \u043d\u0438\u043c. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u043d\u0435 \u0431\u0443\u0434\u0443 \u0443\u0436\u0435 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u044c \u0432\u0438\u0434 \u0438\u0437 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430 (\u0441 \u0442\u0435\u043c\u0438 \u0436\u0435 \u0433\u0440\u0430\u0431\u043b\u044f\u043c\u0438 \u0432 \u0432\u0438\u0434\u0435 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u0440\u0435\u0441\u0443\u0440\u0441\u043d\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430), \u0430 \u0441\u0440\u0430\u0437\u0443 \u0441\u0434\u0435\u043b\u0430\u044e \u0431\u043e\u043b\u0435 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435.<br \/>  \u041d\u0430 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0435\u0439 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u043d\u0438\u0436\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d \u0441\u043b\u0443\u0447\u0430\u0439 \u0434\u043b\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0431\u0435\u0437 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0431\u044d\u043a\u0435\u043d\u0434\u0430 (\u043d\u0430\u043c\u0435\u0440\u0435\u043d\u043d\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f JSClient). \u0410 \u0442\u0430\u043a\u0436\u0435 \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u0432 \u0441\u043b\u0443\u0447\u0430\u0435, \u043a\u043e\u0433\u0434\u0430 \u0443 \u043d\u0430\u0441 \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0438 \u0440\u0435\u0441\u0443\u0440\u0441\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0430 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0435, \u0442\u043e \u043c\u044b \u0432\u044b\u043d\u0443\u0436\u0434\u0435\u043d\u044b \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c API \u0448\u043b\u044e\u0437 \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a (URI, \u0432\u0430\u043b\u0438\u0434\u043d\u043e\u0441\u0442\u044c \u0442\u043e\u043a\u0435\u043d\u0430, \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0438 \u0442.\u0434.) \u043d\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u043d\u044b\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c:  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0410uthorization code grant \u0441 PKCE \u0438 API Gateway<\/b>                         <\/p>\n<div class=\"spoiler_text\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/yx\/hm\/p-\/yxhmp-ojlcb-a2rjjwrxsnmiz8s.png\">  <\/div>\n<\/p><\/div>\n<h3>\u041f\u0430\u043c\u044f\u0442\u043a\u0430 \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432<\/h3>\n<p>  \u0418\u043c\u0435\u044e\u0449\u0438\u0439\u0441\u044f \u0441\u0435\u0439\u0447\u0430\u0441 \u0443 \u043c\u0435\u043d\u044f \u043e\u043f\u044b\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u043c\u0438, \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0449\u0438\u043c\u0438 OAuth 2, \u0445\u043e\u0442\u0435\u043b\u0430 \u0431\u044b \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0432 \u0441\u0442\u0430\u0442\u044c\u0435, \u0442\u0430\u043a \u043a\u0430\u043a \u043d\u0430\u0434\u0435\u044e\u0441\u044c, \u0447\u0442\u043e \u043e\u043d \u043c\u043e\u0436\u0435\u0442 \u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043a\u043e\u043c\u0443-\u0442\u043e \u043f\u043e\u043b\u0435\u0437\u0435\u043d \u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u0435\u0435 \u0437\u0430\u0449\u0438\u0449\u0430\u0442\u044c \u043d\u0430\u0448\u0438 \u0441 \u0432\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0441\u0435\u0442\u0438.<br \/>  \u041f\u043e\u0437\u0432\u043e\u043b\u044e \u0441\u0435\u0431\u0435 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043a \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u043c \u043f\u043e\u0442\u043e\u043a\u0430\u043c \u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0445 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0442, \u0440\u0430\u0437\u043b\u043e\u0436\u0438\u0442\u044c \u0432 \u0432\u0438\u0434\u0435 \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u043f\u0440\u0438\u043d\u044f\u0442\u0438\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u0439:  <\/p>\n<div class=\"scrollable-table\">\n<table>\n<tbody>\n<tr>\n<th>\u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u043e OAuth 2.0<\/th>\n<th>OAuth2\/OIDC\u00a0Authorization code\u00a0Grandt<\/th>\n<th>OAuth2\/OIDC\u00a0Authorization code\u00a0Grand\u00a0with PKCE<\/th>\n<th>Client Credentials Grant<\/th>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/tools.ietf.org\/html\/draft-ietf-oauth-browser-based-apps-06\" rel=\"nofollow noopener noreferrer\">Web application <\/a>with a Confidential Client<\/td>\n<td>+<\/td>\n<td>+<\/td>\n<td>+<\/td>\n<\/tr>\n<tr>\n<td>User-agent-based application:<br \/>  <a href=\"https:\/\/tools.ietf.org\/html\/draft-ietf-oauth-browser-based-apps-06#section-6.3\" rel=\"nofollow noopener noreferrer\">JavaScript Applications without a Backend\u00a0with a Public Client<\/a><\/td>\n<td>&#8212;<\/td>\n<td>+<\/td>\n<td>&#8212;<\/td>\n<\/tr>\n<tr>\n<td>User-agent-based application:<br \/>  <a href=\"https:\/\/tools.ietf.org\/html\/draft-ietf-oauth-browser-based-apps-06#section-6.2\" rel=\"nofollow noopener noreferrer\">Javascript application with a Backend\u00a0with a Confidential Client<\/a><\/td>\n<td>+<\/td>\n<td>+<\/td>\n<td>+<\/td>\n<\/tr>\n<tr>\n<td>Application without an authentification flow\u00a0with a Confidential Client<\/td>\n<td>&#8212;<\/td>\n<td>&#8212;<\/td>\n<td>+<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>  \u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0438\u043b\u0438 \u0438\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0441\u0432\u043e\u0438 \u043f\u043b\u044e\u0441\u044b \u0438 \u043c\u0438\u043d\u0443\u0441\u044b. \u0412\u043a\u0440\u0430\u0442\u0446\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u00abJavaScript application with no backend\u00bb \u0438 \u00abJavaScript application with a backend\u00bb \u0438 \u0434\u0430\u0434\u0438\u043c \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438 \u043a \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f\u043c:  <\/p>\n<div class=\"scrollable-table\">\n<table>\n<tbody>\n<tr>\n<th>JavaScript application with no backend<\/th>\n<th>JavaScript application with a backend<\/th>\n<\/tr>\n<tr>\n<td>\u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f:  <\/p>\n<ol>\n<li>\u0412 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435\u00a0\u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 redirect_url.<\/li>\n<li>\u0414\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0442\u043e\u043a\u0435\u043d\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u00a0js \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435.<\/li>\n<li>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f Public Client.<\/li>\n<li>\u0412 \u043f\u043e\u0442\u043e\u043a\u0435 Authorization Code Grant Flow with PKCE \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0442\u043e\u043a\u0435\u043d\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c API Gateway:<\/li>\n<\/ol>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0410uthorization code grant \u0441 PKCE \u0438 API Gateway<\/b>                         <\/p>\n<div class=\"spoiler_text\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/yx\/hm\/p-\/yxhmp-ojlcb-a2rjjwrxsnmiz8s.png\">  <\/div>\n<\/p><\/div>\n<p>  <\/td>\n<td>\u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f:  <\/p>\n<ol>\n<li>ClientID \u0438 Secret \u0432 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/li>\n<li>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f Confidential Client.<\/li>\n<li>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0442\u043e\u043a Authorization Code Grant Flow (\u043a\u0430\u043a \u0441 PKCE, \u0442\u0430\u043a \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u043e \u0438 \u0431\u0435\u0437):<br \/> \n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">Authorization Code Grant with a Resource Server (Resource Server != Authorization Server)<\/b>                         <\/p>\n<div class=\"spoiler_text\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/0x\/ln\/v3\/0xlnv3nmb6km9mhqz6c49pkngmk.png\">  <\/div>\n<\/p><\/div>\n<\/li>\n<\/ol>\n<p>  <\/td>\n<\/tr>\n<tr>\n<td>\u041d\u0435 \u0441\u0442\u043e\u0438\u0442:  <\/p>\n<ol>\n<li>\u0420\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e \u0432\u043d\u0443\u0442\u0440\u0438 \u0431\u0438\u0437\u043d\u0435\u0441-\u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432.<\/li>\n<li>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c offline_access.<\/li>\n<li>\u041f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c\u00a0\u0442\u043e\u043a\u0435\u043d\u044b \u0432 path- \u0438 query- \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u0445.<\/li>\n<li>\u0420\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0438 \u0440\u0435\u0441\u0443\u0440\u0441\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u0432 \u0435\u0434\u0438\u043d\u043e\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0438.<\/li>\n<\/ol>\n<p>  <\/td>\n<td>\u041d\u0435 \u0441\u0442\u043e\u0438\u0442:  <\/p>\n<ol>\n<li>\u041f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c ID Token, Access Token, Refresh Token \u0438\u0437 \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0430\u0433\u0435\u043d\u0442\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f (\u0431\u0440\u0430\u0443\u0437\u0435\u0440), \u0442.\u0435. \u0442\u043e\u043a\u0435\u043d \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 \u0431\u044d\u043a\u0430.<\/li>\n<\/ol>\n<p>  <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>  \u041f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0435 \u0432\u044b\u0448\u0435 \u0437\u0430\u043c\u0435\u0442\u043a\u0438, \u043d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u044b \u043f\u0440\u0438 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u0447\u0435\u043a-\u043b\u0438\u0441\u0442\u0430 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0439 \u043a \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u043c, \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0449\u0438\u043c \u0437\u0430 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438\/\u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u044f \u0447\u0442\u043e-\u0442\u043e \u0432\u0430\u0436\u043d\u043e\u0435, \u043d\u0430 \u0432\u0430\u0448 \u0432\u0437\u0433\u043b\u044f\u0434, \u0443\u043f\u0443\u0441\u043a\u0430\u044e. \u041f\u043e\u043c\u043e\u0436\u0435\u0442\u0435 \u043c\u043d\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0439 \u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439? <\/p>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>  \u0412 \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438, \u0434\u0443\u043c\u0430\u044e, \u0441\u0442\u043e\u0438\u0442 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0438\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u0442\u043e\u0439 \u0434\u0438\u043d\u0430\u043c\u0438\u043a\u0438, \u043e \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0433\u043e\u0432\u043e\u0440\u0438\u043b\u043e\u0441\u044c \u0432\u044b\u0448\u0435 \u043f\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044e OAuth 2.0 RFC \u0438 \u0434\u0440\u0430\u0444\u0442\u0430\u043c\u0438 \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 9 \u043b\u0435\u0442, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043e\u0436\u0438\u0434\u0430\u0442\u044c, \u0447\u0442\u043e \u0441\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c, \u0432\u0441\u0435-\u0442\u0430\u043a\u0438 \u043d\u0430\u0448\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0441\u0442\u0430\u043d\u0443\u0442 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u0435\u0435 \u0438 \u043d\u0430\u0434\u0435\u0436\u043d\u0435\u0435. \u041c\u044b \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0441\u0442\u0440\u043e\u0436\u0435, \u043d\u043e \u0432 \u0442\u043e \u0436\u0435 \u0432\u0440\u0435\u043c\u044f, \u043e\u043d \u0438 \u043d\u0435\u0438\u0437\u0431\u0435\u0436\u043d\u043e \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043f\u043e\u0434 \u0432\u043b\u0438\u044f\u043d\u0438\u0435\u043c \u0442\u0435\u043d\u0434\u0435\u043d\u0446\u0438\u0439 \u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435. \u0425\u043e\u0442\u044f \u0431\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u044f \u0431\u044b \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u043b\u0430 \u043d\u0435 \u0442\u0435\u0440\u044f\u0442\u044c \u0438 \u043d\u0435 \u0440\u0430\u0441\u0441\u043b\u0430\u0431\u043b\u044f\u0442\u044c\u0441\u044f: \u0441 \u043d\u043e\u0432\u044b\u043c\u0438 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f\u043c\u0438 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u0442\u044c\u0441\u044f \u0438 \u0441 \u043d\u043e\u0432\u044b\u043c\u0438 \u043d\u0435\u043b\u0435\u043f\u044b\u043c\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f\u043c\u0438 \u0438\u0437-\u0437\u0430 \u0434\u0432\u0443\u0441\u043c\u044b\u0441\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u043e\u043a.<\/p>\n<p>  <b><i>\u0421\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0439 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u043e\u0440,<\/i><\/b><br \/>  <b><i>&copy; \u0418\u0440\u0438\u043d\u0430 \u0411\u043b\u0430\u0436\u0438\u043d\u0430<\/i><\/b><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/535174\/\"> https:\/\/habr.com\/ru\/post\/535174\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\">\n<blockquote><p><i>\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u043e\u0440\u044b \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0432\u044b\u0434\u0443\u043c\u044b\u0432\u0430\u044e\u0442. \u041e\u043d\u0438 \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0438\u0440\u0443\u044e\u0442 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c.<\/i><\/p>\n<p>  \u0410\u043b\u0432\u0430\u0440\u043e \u0421\u0438\u0437\u0430 \u0412\u0438\u044d\u0439\u0440\u0430  <\/p><\/blockquote>\n<p>  \u041c\u043d\u043e\u0433\u043e \u0432\u0441\u0435\u0433\u043e \u0443\u0436\u0435 \u0441\u043a\u0430\u0437\u0430\u043d\u043e \u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u043f\u0440\u043e <a href=\"https:\/\/tools.ietf.org\/html\/rfc6749\" rel=\"nofollow noopener noreferrer\">\u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 OAuth 2.0<\/a> \u0441 2012 \u0433\u043e\u0434\u0430. \u0418, \u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0431\u044b, \u0432\u0441\u0435 \u0434\u0430\u0432\u043d\u043e \u0435\u0433\u043e \u0437\u043d\u0430\u044e\u0442, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442, \u0432\u0441\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u043e \u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e. <br \/>  \u041d\u043e, \u043a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u043e, \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u0432\u0441\u0435 \u0438\u043d\u0430\u0447\u0435. \u0412 \u0440\u0430\u0431\u043e\u0442\u0435 \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0441 \u043d\u0435\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u043c\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f\u043c\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438. \u041e\u0433\u043e\u0440\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u043f\u043e <a href=\"https:\/\/cybermap.kaspersky.com\/ru\/stats\" rel=\"nofollow noopener noreferrer\">\u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0435<\/a> \u0420\u043e\u0441\u0441\u0438\u044f \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u043d\u0435\u043f\u043e\u0447\u0435\u0442\u043d\u043e\u0435 \u043f\u0435\u0440\u0432\u043e\u0435 \u043c\u0435\u0441\u0442\u043e \u043f\u043e \u0441\u0432\u043e\u0435\u0439 \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0438. <br \/>  \u041f\u043e\u0447\u0435\u043c\u0443 \u0436\u0435 \u0442\u0430\u043a \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f? \u041f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0432\u043c\u0435\u0441\u0442\u0435 \u0441\u043e \u043c\u043d\u043e\u0439 \u0438 \u0430\u0432\u0442\u043e\u0440\u0430\u043c\u0438 \u0434\u0440\u0430\u0444\u0442\u0430 <a href=\"https:\/\/tools.ietf.org\/html\/draft-ietf-oauth-v2-1-00\" rel=\"nofollow noopener noreferrer\">OAuth 2.1<\/a> \u043e\u0442 \u0438\u044e\u043b\u044f 2020 \u0433\u043e\u0434\u0430 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0440\u0430\u0431\u043e\u0442\u0443 \u043d\u0430\u0434 \u043e\u0448\u0438\u0431\u043a\u0430\u043c\u0438. \u042d\u0442\u043e \u0438 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u0440\u0430\u0436\u0435\u043d\u0438\u0435\u043c, \u043d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u0442\u043e\u0433\u043e, \u043f\u043e \u043a\u0430\u043a\u043e\u043c\u0443 \u043f\u0443\u0442\u0438 \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u044f \u0438\u0434\u0435\u0442 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a OAuth 2. <\/p>\n<p>  \u0422\u0430\u043a\u0436\u0435 \u0441\u043f\u0435\u0448\u0443 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0434\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u0433\u043e\u0433\u043e \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044f, \u0447\u0442\u043e \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0437\u0430\u0442\u0440\u043e\u043d\u0443 \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0438 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f\u043c\u0438 \u043f\u043e OAuth 2.0. \u042f \u043d\u0435 \u0441\u0442\u0430\u0432\u043b\u044e \u0446\u0435\u043b\u0438 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0438\u0442\u044c \u0432\u0441\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c\u044e \u0432 \u0420\u043e\u0441\u0441\u0438\u0438 \u0432 \u0418\u0422, \u0438 \u043f\u043e\u0447\u0435\u043c\u0443 \u044d\u0442\u043e\u0442 \u0432\u043e\u043f\u0440\u043e\u0441 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043e\u0441\u043e\u0431\u043e\u0433\u043e \u043f\u0440\u0438\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0441\u0435\u0433\u043e\u0434\u043d\u044f.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-317062","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/317062","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=317062"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/317062\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=317062"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=317062"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=317062"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}