{"id":131,"date":"2011-07-04T23:31:51","date_gmt":"2011-07-04T14:31:51","guid":{"rendered":"http:\/\/www.whoocus.com\/blog\/wordpress\/?p=131"},"modified":"2011-07-04T23:31:51","modified_gmt":"2011-07-04T14:31:51","slug":"sfdoctrineoauthplugin-%e3%81%a8-sfmelodyplugin-%e3%81%ae%e7%b6%99%e6%89%bf%e9%96%a2%e4%bf%82","status":"publish","type":"post","link":"https:\/\/www.blowfish.co.jp\/?p=131","title":{"rendered":"sfDoctrineGuardPlugin \u3068 sfDoctrineOAuthPlugin \u3068 sfMelodyPlugin \u306e\u7d99\u627f\u95a2\u4fc2"},"content":{"rendered":"<p><strong><span style=\"color: #ff0000;\">\u203b\u6ce8\u610f \u3053\u306e\u8a18\u4e8b\u306f\u73fe\u5728\u8abf\u67fb\u3092\u9032\u3081\u306a\u304c\u3089\u8a18\u8ff0\u3057\u3066\u3044\u307e\u3059\u306e\u3067\u3001\u5b8c\u5168\u306a\u60c5\u5831\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002<\/span><\/strong><\/p>\n<p>sfMelodyPlugin \u306eReadme\u3082\u7406\u89e3\u3067\u304d\u306a\u3044\u3057\u3001\u60c5\u5831\u30b5\u30a4\u30c8\u3082\u307b\u3068\u3093\u3069\u306a\u3044\u3057\u3001\u4f7f\u7528\u65b9\u6cd5\u304c\u5168\u304f\u5206\u304b\u3089\u306a\u3044\u306e\u3067\u3001\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3092\u8ffd\u3063\u3066\u307f\u308b\u3053\u3068\u306b\u3057\u305f\u3002<\/p>\n<p>\u3068\u308a\u3042\u3048\u305a\u3001\u308f\u304b\u3063\u305f\u3053\u3068\u306f\u3001\u4e0b\u8a18\u306e\u7d99\u627f\u95a2\u4fc2\u304c\u5b58\u5728\u3059\u308b\u3002\u30e9\u30a4\u30d6\u30e9\u30ea\u7684\u306b\u306f\u4f9d\u5b58\u95a2\u4fc2\u3002<\/p>\n<p>\u25a0OAuth\u95a2\u4fc2<\/p>\n<ul>\n<li>sfDoctrineOAuthPlugin\/lib\/base\/vendor\/oauth\/OAuth.php<\/li>\n<li>sfDoctrineOAuthPlugin\/lib\/base\/sfOAuth.class.php<\/li>\n<li>sfDoctrineOAuthPlugin\/lib\/base\/sfOAuth1.class.php<\/li>\n<li>sfMelodyPlugin\/lib\/melody\/base\/sfMelody1.class.php<\/li>\n<li>sfMelodyPlugin\/lib\/melody\/sfTwitterMelody.class.php<\/li>\n<\/ul>\n<p>[php]<br \/>\nclass sfOAuth1 extends sfOAuth<br \/>\n{<br \/>\n}<br \/>\n[\/php]<\/p>\n<p>[php]<br \/>\nclass sfMelody1 extends sfOAuth1<br \/>\n{<br \/>\n}<br \/>\n[\/php]<\/p>\n<p>[php]<br \/>\nclass sfTwitterMelody extends sfMelody1<br \/>\n{<br \/>\n}<br \/>\n[\/php]<\/p>\n<p>\u25a0\u30e6\u30fc\u30b6\u95a2\u4fc2<\/p>\n<ul>\n<li>symfony\/lib\/user\/sfUser.class.php<\/li>\n<li>symfony\/lib\/user\/sfSecurityUser.class.php<\/li>\n<li>symfony\/lib\/user\/sfBasicSecurityUser.class.php<\/li>\n<li>sfDoctrineGuardPlugin\/lib\/user\/sfGuardSecurityUser.class.php<\/li>\n<li>lib\/model\/doctrine\/sfDoctrineGuardPlugin\/sfGuardUser.class.php<\/li>\n<li>sfMelodyPlugin\/lib\/user\/sfMelodyUser.class.php<\/li>\n<li>apps\/frontend\/lib\/myUser.class.php<\/li>\n<\/ul>\n<p>[php]<br \/>\ninterface sfSecurityUser<br \/>\n{<br \/>\n}<br \/>\n[\/php]<br \/>\n[php]<br \/>\nclass sfUser implements ArrayAccess<br \/>\n{<br \/>\n}<br \/>\n[\/php]<br \/>\n[php]<br \/>\n[php]<br \/>\nclass sfBasicSecurityUser extends sfUser implements sfSecurityUser<br \/>\n{<br \/>\n}<br \/>\n[\/php]<br \/>\n[php]<br \/>\nclass sfGuardSecurityUser extends sfBasicSecurityUser<br \/>\n{<br \/>\n}<br \/>\n[\/php]<br \/>\n[php]<br \/>\nclass sfMelodyUser extends sfGuardSecurityUser<br \/>\n{<br \/>\n}<br \/>\n[\/php]<br \/>\n[php]<br \/>\nclass myUser extends sfMelodyUser<br \/>\n\/\/class myUser extends sfBasicSecurityUser<br \/>\n{<br \/>\n}<br \/>\n[\/php]<\/p>\n<p>\u3064\u307e\u308a\u3001\u89aa\u30af\u30e9\u30b9\u306e\u30e1\u30bd\u30c3\u30c9\u3084\u5909\u6570(\u5c5e\u6027)\u3092\u5229\u7528\u53ef\u80fd\u3068\u3044\u3046\u3053\u3068\u3002<\/p>\n<p>\u3067\u3001README \u306b\u3042\u308b\u4e0b\u8a18\u306e\u30b3\u30fc\u30c9\u306f\u3001\u30e6\u30fc\u30b6\u3092\u901a\u3057\u3066\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u7528\u3059\u308b\u3068\u3044\u3046\u3053\u3068\u306e\u3088\u3046\u3060\u3002<\/p>\n<p>[php]<br \/>\npublic function executeIndex(sfWebRequest $request)<br \/>\n{<br \/>\n  \/\/\u30e6\u30fc\u30b6\u3092\u53d6\u5f97\u3057\u30b5\u30fc\u30d3\u30b9\u306b\u63a5\u7d9a\u3059\u308b<br \/>\n  $this-&gt;getUser()-&gt;connect(&#8216;twitter&#8217;); \/\/app.yml \u306b\u767b\u9332\u3057\u305f\u30b5\u30fc\u30d3\u30b9\u540d<br \/>\n}<br \/>\n[\/php]<\/p>\n<p>\u3068\u3044\u3046\u3053\u3068\u306f\u3001\u4e0b\u8a18\u30b3\u30fc\u30c9\u306f\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u5f97\u3089\u308c\u308b\u3068\u3044\u3046\u4e8b\u306a\u306e\u304b\uff1f<\/p>\n<p>[php]<br \/>\n  $melody = $this-&gt;getUser()-&gt;getMelody(&#8216;twitter&#8217;);<br \/>\n[\/php]<\/p>\n<p>\u3069\u3046\u3057\u3066\u3082\u3001Alias \u3068 Namespaces \u306e\u4f7f\u7528\u65b9\u6cd5\u304c\u7406\u89e3\u3067\u304d\u306a\u3044\u3002<br \/>\n\u307e\u305f\u884c\u304d\u8a70\u3063\u305f\u30fb\u30fb\u30fb\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u203b\u6ce8\u610f \u3053\u306e\u8a18\u4e8b\u306f\u73fe\u5728\u8abf\u67fb\u3092\u9032\u3081\u306a\u304c\u3089\u8a18\u8ff0\u3057\u3066\u3044\u307e\u3059\u306e\u3067\u3001\u5b8c\u5168\u306a\u60c5\u5831\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002 sfMelodyPlugin \u306eReadme\u3082\u7406\u89e3\u3067\u304d\u306a\u3044\u3057\u3001\u60c5\u5831\u30b5\u30a4\u30c8\u3082\u307b\u3068\u3093\u3069\u306a\u3044\u3057\u3001\u4f7f\u7528\u65b9\u6cd5\u304c\u5168\u304f\u5206\u304b\u3089\u306a\u3044\u306e\u3067\u3001\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3092 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"saved_in_kubio":false,"footnotes":""},"categories":[13,15,16,4],"tags":[],"class_list":["post-131","post","type-post","status-publish","format-standard","hentry","category-php","category-symfony","category-twitter","category-tech"],"_links":{"self":[{"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/131","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=131"}],"version-history":[{"count":0,"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/131\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=131"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=131"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=131"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}