{"id":1231,"date":"2017-12-18T00:07:52","date_gmt":"2017-12-17T20:07:52","guid":{"rendered":"http:\/\/blog.rc21net.ru\/?p=1231"},"modified":"2022-06-10T01:48:45","modified_gmt":"2022-06-09T21:48:45","slug":"yii-authentication-authorization","status":"publish","type":"post","link":"https:\/\/devkazakov.com\/ru\/blog\/yii-authentication-authorization\/","title":{"rendered":"Yii: \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f"},"content":{"rendered":"<p>\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u044b \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0432 Yii.<\/p>\n<p><strong>\u0410\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f<\/strong> &#8212; \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043b\u0438\u0447\u043d\u043e\u0441\u0442\u0438 (\u0438\u0434\u0435\u043d\u0442\u0438\u0447\u043d\u043e\u0441\u0442\u0438, identity) \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0432\u0432\u043e\u0434 \u043b\u043e\u0433\u0438\u043d\u0430 \u0438 \u043f\u0430\u0440\u043e\u043b\u044f.<\/p>\n<p><strong>\u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f<\/strong> &#8212; \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043f\u0440\u0430\u0432 \u0443\u0436\u0435 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f (\u0438\u043b\u0438 \u0430\u043d\u043e\u043d\u0438\u043c\u043d\u043e\u0433\u043e) \u043d\u0430 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0434\u0430\u043d\u043d\u044b\u043c.<\/p>\n<p><!--more--><\/p>\n<p><strong>Identity<\/strong> &#8212; \u0438\u043d\u0434\u0438\u0432\u0438\u0434\u0443\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u0438\u0434\u0435\u043d\u0442\u0438\u0447\u043d\u043e\u0441\u0442\u044c, \u043f\u043e\u0434\u043b\u0438\u043d\u043d\u043e\u0441\u0442\u044c, \u0442\u043e\u0436\u0434\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0441\u0442\u044c, \u043b\u0438\u0447\u043d\u043e\u0441\u0442\u044c.<\/p>\n<p>\u0414\u043b\u044f \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0432 Yii \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f:<\/p>\n<ul>\n<li>\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 user (<strong>yii\\web\\User<\/strong>)<\/li>\n<li>\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 <strong>yii\\web\\IdentityInterface<\/strong><\/li>\n<\/ul>\n<p>\u0412 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 user (\u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438) \u043d\u0443\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c identityClass &#8212; \u043a\u043b\u0430\u0441\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043b\u043e\u0433\u0438\u043a\u0443 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438. \u041a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u044d\u0442\u043e \u043a\u043b\u0430\u0441\u0441 \u043c\u043e\u0434\u0435\u043b\u0438, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u042d\u0442\u043e\u0442 \u043a\u043b\u0430\u0441\u0441 \u0434\u043e\u043b\u0436\u0435\u043d \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 yii\\web\\IdentityInterface.<\/p>\n<p><strong>\u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 yii\\web\\IdentityInterface<\/strong> \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u044b:<\/p>\n<ul>\n<li><strong>findIdentity()<\/strong> &#8212; \u043f\u043e\u0438\u0441\u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f (\u043b\u0438\u0447\u043d\u043e\u0441\u0442\u0438, identity) \u043f\u043e Id, \u0430 \u0442\u043e\u0447\u043d\u0435\u0435 \u043f\u043e\u0438\u0441\u043a \u00a0\u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 \u043a\u043b\u0430\u0441\u0441\u0430, \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0449\u0435\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 IdentityInterface. \u041c\u0435\u0442\u043e\u0434 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u0443\u0441\u0430 \u0438\u0434\u0435\u0442\u043d\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432 \u0441\u0435\u0441\u0441\u0438\u044e<\/li>\n<li><strong>findIdentityByAccessToken()<\/strong> &#8212; \u0442\u043e\u0436\u0435 \u0441\u0430\u043c\u043e\u0435, \u043d\u043e \u043f\u043e \u0437\u043d\u0430\u043a\u0443 \u0434\u043e\u0441\u0442\u0443\u043f\u0430. \u041f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0432 RESTfull \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445<\/li>\n<li><strong>getId()<\/strong> &#8212; \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 Id \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f (\u043b\u0438\u0447\u043d\u043e\u0441\u0442\u0438, identity)<\/li>\n<li><strong>getAuthKey()<\/strong> &#8212; \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043a\u043b\u044e\u0447 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u0439 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0434\u043b\u044f \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438 \u043a\u043b\u044e\u0447\u0430, \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u043d\u043e\u0433\u043e \u0432 \u043a\u0443\u043a\u0443 \u043f\u0440\u0438 \u043b\u043e\u0433\u0438\u043d\u0435 (\u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438). \u041a\u043b\u044e\u0447\u0438 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0432\u0430\u043b\u0438\u0434\u043d\u043e\u0441\u0442\u0438 \u043a\u043b\u044e\u0447\u0430 \u0438\u0437 \u043a\u0443\u043a\u0438<\/li>\n<li><strong>validateAuthKey()<\/strong> &#8212; \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044f \u043a\u043b\u044e\u0447\u0430 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438, \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u043d\u043e\u0433\u043e \u0432 \u043a\u0443\u043a\u0443<\/li>\n<\/ul>\n<p>\u0420\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u043d\u0435 \u043d\u0443\u0436\u043d\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441 \u043f\u0443\u0441\u0442\u044b\u043c \u0442\u0435\u043b\u043e\u043c.\u00a0\u0412 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 MVC \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043c\u0435\u0442\u043e\u0434\u044b findIdentity(), getAuthKey(), validateAuthKey() \u0438 getId(), \u0432 REST \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445 &#8212; findIdentityByAccessToken() \u0438 getId().<\/p>\n<p>\u041a\u043b\u0430\u0441\u0441, \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0449\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 yii\\web\\IdentityInterface, \u043c\u043e\u0436\u0435\u0442 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043e\u0442 ActiveRecord.<\/p>\n<p>\u0412 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430\u0445 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 user (yii\\web\\User) \u0434\u043b\u044f \u0438\u0434\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<ul>\n<li><strong>Yii::$app-&gt;user-&gt;identity<\/strong> &#8212; \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043a\u043b\u0430\u0441\u0441\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0439 \u0437\u0430\u043b\u043e\u0433\u0438\u043d\u0435\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438\u043b\u0438 null \u0435\u0441\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043d\u0435 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d<\/li>\n<li><strong>Yii::$app-&gt;user-&gt;id<\/strong> &#8212; \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 id \u0437\u0430\u043b\u043e\u0433\u0438\u043d\u0435\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f (null \u0434\u043b\u044f \u043d\u0435 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u0446\u043e\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445)<\/li>\n<li><strong>Yii::$app-&gt;user-&gt;isGuest<\/strong> &#8212; true \u0435\u0441\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043d\u0435 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d<\/li>\n<li><strong>Yii::$app-&gt;user-&gt;login($identity)<\/strong> &#8212; \u0437\u0430\u043b\u043e\u0433\u0438\u043d\u0438\u0432\u0430\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f<\/li>\n<li><strong>Yii::$app-&gt;user-&gt;logout()<\/strong> &#8212; \u0440\u0430\u0437\u043b\u043e\u0433\u0438\u043d\u0438\u0432\u0430\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f<\/li>\n<\/ul>\n<!-- AddThis Advanced Settings generic via filter on the_content --><!-- AddThis Share Buttons generic via filter on the_content -->","protected":false},"excerpt":{"rendered":"<p>\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u044b \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0432 Yii. \u0410\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f &#8212; \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043b\u0438\u0447\u043d\u043e\u0441\u0442\u0438 (\u0438\u0434\u0435\u043d\u0442\u0438\u0447\u043d\u043e\u0441\u0442\u0438, identity) \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0432\u0432\u043e\u0434 \u043b\u043e\u0433\u0438\u043d\u0430 \u0438 \u043f\u0430\u0440\u043e\u043b\u044f. \u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f &#8212; \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043f\u0440\u0430\u0432 \u0443\u0436\u0435 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f (\u0438\u043b\u0438 \u0430\u043d\u043e\u043d\u0438\u043c\u043d\u043e\u0433\u043e) \u043d\u0430 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0434\u0430\u043d\u043d\u044b\u043c.<!-- AddThis Advanced Settings generic via filter on get_the_excerpt --><!-- AddThis Share Buttons generic via filter on get_the_excerpt --><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[12,13],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v18.4.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Yii: \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f | devKazakov.com<\/title>\n<meta name=\"description\" content=\"\u0414\u043b\u044f \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0432 Yii \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 user (yiiwebUser) \u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 yiiwebIdentityInterface\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/devkazakov.com\/ru\/blog\/yii-authentication-authorization\/\" \/>\n<meta property=\"og:locale\" content=\"ru_RU\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Yii: \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f | devKazakov.com\" \/>\n<meta property=\"og:description\" content=\"\u0414\u043b\u044f \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0432 Yii \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 user (yii\\web\\User) \u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 yii\\web\\IdentityInterface\" \/>\n<meta property=\"og:url\" content=\"https:\/\/devkazakov.com\/ru\/blog\/yii-authentication-authorization\/\" \/>\n<meta property=\"og:site_name\" content=\"devKazakov.com\" \/>\n<meta property=\"article:published_time\" content=\"2017-12-17T20:07:52+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-06-09T21:48:45+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u041d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u0430\u0432\u0442\u043e\u0440\u043e\u043c\" \/>\n\t<meta name=\"twitter:data1\" content=\"Roman Kazakov\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u041f\u0440\u0438\u043c\u0435\u0440\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u043c\u0438\u043d\u0443\u0442\u044b\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/devkazakov.com\/ru\/#website\",\"url\":\"https:\/\/devkazakov.com\/ru\/\",\"name\":\"devKazakov.com\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/devkazakov.com\/ru\/#\/schema\/person\/b3f48bf8438d7d5354ee81e92dc477c3\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/devkazakov.com\/ru\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"ru-RU\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/devkazakov.com\/ru\/blog\/yii-authentication-authorization\/#webpage\",\"url\":\"https:\/\/devkazakov.com\/ru\/blog\/yii-authentication-authorization\/\",\"name\":\"Yii: \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f | devKazakov.com\",\"isPartOf\":{\"@id\":\"https:\/\/devkazakov.com\/ru\/#website\"},\"datePublished\":\"2017-12-17T20:07:52+00:00\",\"dateModified\":\"2022-06-09T21:48:45+00:00\",\"description\":\"\u0414\u043b\u044f \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0432 Yii \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 user (yii\\\\web\\\\User) \u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 yii\\\\web\\\\IdentityInterface\",\"breadcrumb\":{\"@id\":\"https:\/\/devkazakov.com\/ru\/blog\/yii-authentication-authorization\/#breadcrumb\"},\"inLanguage\":\"ru-RU\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/devkazakov.com\/ru\/blog\/yii-authentication-authorization\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/devkazakov.com\/ru\/blog\/yii-authentication-authorization\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/devkazakov.com\/ru\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Yii: \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f\"}]},{\"@type\":\"Article\",\"@id\":\"https:\/\/devkazakov.com\/ru\/blog\/yii-authentication-authorization\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/devkazakov.com\/ru\/blog\/yii-authentication-authorization\/#webpage\"},\"author\":{\"@id\":\"https:\/\/devkazakov.com\/ru\/#\/schema\/person\/b3f48bf8438d7d5354ee81e92dc477c3\"},\"headline\":\"Yii: \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f\",\"datePublished\":\"2017-12-17T20:07:52+00:00\",\"dateModified\":\"2022-06-09T21:48:45+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/devkazakov.com\/ru\/blog\/yii-authentication-authorization\/#webpage\"},\"wordCount\":97,\"publisher\":{\"@id\":\"https:\/\/devkazakov.com\/ru\/#\/schema\/person\/b3f48bf8438d7d5354ee81e92dc477c3\"},\"keywords\":[\"PHP\",\"Yii\"],\"inLanguage\":\"ru-RU\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/devkazakov.com\/ru\/#\/schema\/person\/b3f48bf8438d7d5354ee81e92dc477c3\",\"name\":\"Roman Kazakov\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/devkazakov.com\/ru\/#personlogo\",\"inLanguage\":\"ru-RU\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/d99e1eb55cb87629fd1b4c80a24ea831?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/d99e1eb55cb87629fd1b4c80a24ea831?s=96&d=mm&r=g\",\"caption\":\"Roman Kazakov\"},\"logo\":{\"@id\":\"https:\/\/devkazakov.com\/ru\/#personlogo\"},\"sameAs\":[\"https:\/\/devkazakov.com\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Yii: \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f | devKazakov.com","description":"\u0414\u043b\u044f \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0432 Yii \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 user (yiiwebUser) \u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 yiiwebIdentityInterface","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/devkazakov.com\/ru\/blog\/yii-authentication-authorization\/","og_locale":"ru_RU","og_type":"article","og_title":"Yii: \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f | devKazakov.com","og_description":"\u0414\u043b\u044f \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0432 Yii \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 user (yii\\web\\User) \u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 yii\\web\\IdentityInterface","og_url":"https:\/\/devkazakov.com\/ru\/blog\/yii-authentication-authorization\/","og_site_name":"devKazakov.com","article_published_time":"2017-12-17T20:07:52+00:00","article_modified_time":"2022-06-09T21:48:45+00:00","twitter_card":"summary_large_image","twitter_misc":{"\u041d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u0430\u0432\u0442\u043e\u0440\u043e\u043c":"Roman Kazakov","\u041f\u0440\u0438\u043c\u0435\u0440\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f":"2 \u043c\u0438\u043d\u0443\u0442\u044b"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebSite","@id":"https:\/\/devkazakov.com\/ru\/#website","url":"https:\/\/devkazakov.com\/ru\/","name":"devKazakov.com","description":"","publisher":{"@id":"https:\/\/devkazakov.com\/ru\/#\/schema\/person\/b3f48bf8438d7d5354ee81e92dc477c3"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/devkazakov.com\/ru\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"ru-RU"},{"@type":"WebPage","@id":"https:\/\/devkazakov.com\/ru\/blog\/yii-authentication-authorization\/#webpage","url":"https:\/\/devkazakov.com\/ru\/blog\/yii-authentication-authorization\/","name":"Yii: \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f | devKazakov.com","isPartOf":{"@id":"https:\/\/devkazakov.com\/ru\/#website"},"datePublished":"2017-12-17T20:07:52+00:00","dateModified":"2022-06-09T21:48:45+00:00","description":"\u0414\u043b\u044f \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0432 Yii \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 user (yii\\web\\User) \u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 yii\\web\\IdentityInterface","breadcrumb":{"@id":"https:\/\/devkazakov.com\/ru\/blog\/yii-authentication-authorization\/#breadcrumb"},"inLanguage":"ru-RU","potentialAction":[{"@type":"ReadAction","target":["https:\/\/devkazakov.com\/ru\/blog\/yii-authentication-authorization\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/devkazakov.com\/ru\/blog\/yii-authentication-authorization\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/devkazakov.com\/ru\/"},{"@type":"ListItem","position":2,"name":"Yii: \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f"}]},{"@type":"Article","@id":"https:\/\/devkazakov.com\/ru\/blog\/yii-authentication-authorization\/#article","isPartOf":{"@id":"https:\/\/devkazakov.com\/ru\/blog\/yii-authentication-authorization\/#webpage"},"author":{"@id":"https:\/\/devkazakov.com\/ru\/#\/schema\/person\/b3f48bf8438d7d5354ee81e92dc477c3"},"headline":"Yii: \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f","datePublished":"2017-12-17T20:07:52+00:00","dateModified":"2022-06-09T21:48:45+00:00","mainEntityOfPage":{"@id":"https:\/\/devkazakov.com\/ru\/blog\/yii-authentication-authorization\/#webpage"},"wordCount":97,"publisher":{"@id":"https:\/\/devkazakov.com\/ru\/#\/schema\/person\/b3f48bf8438d7d5354ee81e92dc477c3"},"keywords":["PHP","Yii"],"inLanguage":"ru-RU"},{"@type":["Person","Organization"],"@id":"https:\/\/devkazakov.com\/ru\/#\/schema\/person\/b3f48bf8438d7d5354ee81e92dc477c3","name":"Roman Kazakov","image":{"@type":"ImageObject","@id":"https:\/\/devkazakov.com\/ru\/#personlogo","inLanguage":"ru-RU","url":"https:\/\/secure.gravatar.com\/avatar\/d99e1eb55cb87629fd1b4c80a24ea831?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d99e1eb55cb87629fd1b4c80a24ea831?s=96&d=mm&r=g","caption":"Roman Kazakov"},"logo":{"@id":"https:\/\/devkazakov.com\/ru\/#personlogo"},"sameAs":["https:\/\/devkazakov.com"]}]}},"_links":{"self":[{"href":"https:\/\/devkazakov.com\/ru\/wp-json\/wp\/v2\/posts\/1231"}],"collection":[{"href":"https:\/\/devkazakov.com\/ru\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devkazakov.com\/ru\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devkazakov.com\/ru\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/devkazakov.com\/ru\/wp-json\/wp\/v2\/comments?post=1231"}],"version-history":[{"count":1,"href":"https:\/\/devkazakov.com\/ru\/wp-json\/wp\/v2\/posts\/1231\/revisions"}],"predecessor-version":[{"id":2066,"href":"https:\/\/devkazakov.com\/ru\/wp-json\/wp\/v2\/posts\/1231\/revisions\/2066"}],"wp:attachment":[{"href":"https:\/\/devkazakov.com\/ru\/wp-json\/wp\/v2\/media?parent=1231"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devkazakov.com\/ru\/wp-json\/wp\/v2\/categories?post=1231"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devkazakov.com\/ru\/wp-json\/wp\/v2\/tags?post=1231"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}