Play2�v���O�C���̃C���X�g�[���Ǝg�p�ƐV�K�J���FScala�{Play 2.0��Web�A�v���J������i�I�j�i1/3 �y�[�W�j

2.0����Scala�ɑΉ�����Web�A�v���J���̐l�C�y�ʃt���[�����[�N�uPlay framework�v�ɂ‚��ĉ�����AWeb�A�v���̍������Љ�����A�ځB�ŏI��́APlay���g�����A�v���P�[�V�������g��������d�g�݁A�v���O�C���̎g��������ъJ�����@���Љ�܂��B

» 2014�N01��28�� 18��00�� ���J
[�����C���C�N���X���\�b�h�������]

�@�O��̋L���uPlay2�{nginx/Akka/WebSocket�ō����o�����ʐM�v�ł́APlay framework 2�i�ȉ��APlay2�j�A�v����nginx�̘A�g���@��Akka/WebSocket���g���A���񏈗���o�����ʐM���s�����@���Љ�܂����B

�@�{�A���̍ŏI��ƂȂ鍡��́APlay2�A�v�����g��������d�g�݁A�v���O�C���̎g��������ъJ�����@���Љ�܂��B

Play2�v���O�C���Ƃ�

�@Play2�ł́A�u�v���O�C���v�i�u���W���[���v�Ƃ��Ă΂�܂��j�Ƃ����d�g�݂𗘗p���ċ@�\���g���ł��܂��B�v���O�C�����g���ƁAPlay2�A�v����Play�R���\�[���ɑ΂��ċ@�\�lj����”\�ɂȂ�܂��B

�@Play2�A�v����war������v���O�C����Groovy���e���v���[�g�G���W���Ƃ��Ďg����v���O�C���ȂǁA���܂��܂ȃv���O�C�������J����Ă��܂��B

�@�Ȃ��A����������Play2�p�̃v���O�C���́A�uDocument:Play 2.0 Modules�v�uPlay Modules�v�ŒT���܂��B

�uDeadbolt�v�Ŏ���Play2�v���O�C���̃C���X�g�[��

�@�ł́APlay2�v���O�C�����ǂ̂悤�ɂ���Ύg����̂�������܂��傤�B

�@�A�ڑ�7��́uPlay 2.x����MySQL�ɐڑ�����Anorm��CRUD���삷��ɂ��v�ł́ABuild.scala��appDependencies�i�ꍇ�ɂ���Ă�plugins.sbt�j�ɋL�q���邱�ƂŁAMySQL�p��JDBC�h���C�o��lj����܂����B

�@����Ɠ����悤�ɁAPlay2�̃v���O�C�����lj��ł��܂��B

�@�Ⴆ�΁Aproject/Build.scala�t�@�C���Ɏ��̂悤�ȋL�q������΁A�v���O�C�����C���X�g�[���ł��܂��B�v���O�C����lj�����ɂ́Aplay.Project�Ń��|�W�g���̒lj��ƁAappDependencies�Ńv���O�C���̃o�[�W�������w�肵�܂��B

�E
�E
�E
   val appDependencies = Seq(
      "be.objectify" %% "deadbolt-scala" % "2.1-RC3"
    )
   val main = play.Project(appName, appVersion, appDependencies).settings(
      resolvers += Resolver.url("Objectify Play Repository", url("http://schaloner.github.com/releases/"))(Resolver.ivyStylePatterns),
      resolvers += Resolver.url("Objectify Play Repository - snapshots", url("http://schaloner.github.com/snapshots/"))(Resolver.ivyStylePatterns),
      resolvers += "typesafe" at "http://repo.typesafe.com/typesafe/repo"
    )
�E
�E
�E

�@�����ŃC���X�g�[�����Ă���uDeadbolt�v�Ƃ����v���O�C���́A�R���g���[���[�̃��\�b�h��A�r���[�ɃV���v����AND�^OR�^NOT�`���̕��@�ŃA�N�Z�X�������`���A�F�؂̎d�g�݂������ł���v���O�C���ł��B

�@Build.scala�ɏ�L�̋L�q��������APlay�R���\�[�����play reload�R�}���h�����s���܂��傤�B���̌�Adependencies�R�}���h�����s����΁A�v���O�C�����C���X�g�[���ł��܂��B

�uSecureSocial�v��Play2�v���O�C�����J�X�^�}�C�Y���Ďg���Ă݂�

�@���ۂ�Play2�v���O�C�����g���Ă݂܂��傤�B�����ł́A�uSecureSocial�v�Ƃ���OAuth�^OAuth 2�^�Ǝ��F�؂ɑΉ������F�؂̂��߂̃v���O�C�����g���Ă݂܂��B

�@���̃v���O�C���͂��낢��ȃT�[�r�X���g���ĔF�؂��s���ATwitter�^Facebook�^Google�^LinkedIn�^Instagram�Ȃǂ̃A�J�E���g���g���܂��B����͂��̃v���O�C�����g���AFacebook���g�����F�؂��������Ă݂܂��傤�B

Facebook�A�v���̓o�^

�@�܂��͍���̔F�؂Ɏg�����߂�Facebook�A�v�����uFacebook Developer�v�ō쐬���Ă����܂��B

�@Facebook Developer�̃��j���[����A�v�����V�����A�v�����쐬��I�����ADisplay Name/Namespace/�J�e�S������͂��ăA�v�����쐬���܂��B

�@�A�v�����쐬�������ʍ��̃��j���[����ݒ��I�����A�u+Add Platform�v�{�^���������܂��BWeb�T�C�g��I�����A�T�C�gURL��Mobile Site URL�Ɂuhttp://localhost:9000/�v�Ɠ��͂��܂��B

Facebook�A�v����Web�T�C�g�ݒ�

�@�o�^�����A�v���̃A�v���P�[�V����ID�ƃV�[�N���b�g�L�[�͌�ŕK�v�ɂȂ�̂Ŋo���Ă����܂��傤�B

SecureSocial�v���O�C���̃C���X�g�[��

�@���ɁAproject/Build.scala�Ɉˑ��֌W�̋L�q�����܂��B���L�̂悤�ɁASecureSocial�v���O�C���̃o�[�W�����ƃ��|�W�g����ݒ肵�܂��傤�B

�E
�E
�E
  val appDependencies = Seq("securesocial" %% "securesocial" % "2.1.2")
  //Play2.2�ȍ~�̏ꍇ:"securesocial" %% "securesocial" % "master-SNAPSHOT"
  val main = play.Project(appName, appVersion, appDependencies).settings(
    resolvers += Resolver.url("sbt-plugin-releases", new URL("http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/"))(Resolver.ivyStylePatterns)
    /*
    Play2.2�ȍ~�̏ꍇ:
    resolvers += Resolver.url("sbt-plugin-snapshots", 
    new URL("http://repo.scala-sbt.org/scalasbt/sbt-plugin-snapshots/"))(Resolver.ivyStylePatterns)) 
    */
�E
�E
�E

�@2014�N1�����݁APlay 2.1��2.2�ł͐ݒ肷����e���Ⴄ�̂Œ��ӂ��Ă��������B����Play 2.2�ɑΉ�����Securesocial�v���O�C���́Amaster�X�i�b�v�V���b�g����擾���܂��B

�@�����܂ŋL�q������APlay�R���\�[�����N�����Ă���ݒ�t�@�C�����X�V���A�ˑ����郉�C�u�������_�E�����[�h���܂��傤�B

$ play
�E
�E
�E
[gyro] $ reload
[gyro] $ dependencies

�ݒ�t�@�C���̒lj�

�@���ɁAconf/routes��Securesocial�p�R���g���[���[�̐ݒ��lj����܂��B

�E
�E
�E
# Login page
GET     /login                      securesocial.controllers.LoginPage.login
GET     /logout                     securesocial.controllers.LoginPage.logout
# User Registration and password handling 
GET     /signup                     securesocial.controllers.Registration.startSignUp
POST    /signup                     securesocial.controllers.Registration.handleStartSignUp
GET     /signup/:token              securesocial.controllers.Registration.signUp(token)
POST    /signup/:token              securesocial.controllers.Registration.handleSignUp(token)
GET     /reset                      securesocial.controllers.Registration.startResetPassword
POST    /reset                      securesocial.controllers.Registration.handleStartResetPassword
GET     /reset/:token               securesocial.controllers.Registration.resetPassword(token)
POST    /reset/:token               securesocial.controllers.Registration.handleResetPassword(token)
GET     /password                   securesocial.controllers.PasswordChange.page
POST    /password                   securesocial.controllers.PasswordChange.handlePasswordChange
�E
�E
�E

�@�����āA�uconf�v�f�B���N�g���Ɂuplay.plugins�v�Ƃ������O�ŐV�����t�@�C�����쐬���܂��傤�B�����ł͉��L�̂悤�ɁA�v���O�C���̎��s�D��x�ƃN���X���w�肵�܂��B

1500:com.typesafe.plugin.CommonsMailerPlugin
9994:securesocial.core.DefaultAuthenticatorStore
9995:securesocial.core.DefaultIdGenerator
9996:securesocial.core.providers.utils.DefaultPasswordValidator
9997:securesocial.controllers.DefaultTemplatesPlugin
9998:services.MyUserService �����̌�ɍ쐬����N���X
#���[�U�[���ƃp�X���[�h����͂�����ʏ�̃t�H�[��
#9999:securesocial.core.providers.utils.BCryptPasswordHasher
#10004:securesocial.core.providers.UsernamePasswordProvider
10001:securesocial.core.providers.FacebookProvider

�@�����Facebook�A�J�E���g���g���ĔF�؂��s���̂ŁAFacebookProvider�i�D�揇�ʂ�10001�j���g���܂��B

�@���̂悤�ɁASecureSocial�v���O�C���̓��W���[�����A�[�L�e�N�`���ƂȂ��Ă���A�C�ӂ̑g�ݍ��݃v���O�C�����g���܂��B

�@�uSecureSocial�̌����T�C�g�v�ɂ���悤�ɁATwitterProvider��GoogleProvider�ȂǁA��v�ȃT�[�r�X�ɑΉ������F�ؗpProvider������܂��B

�@�Ȃ��A9998�Ŏw�肵�Ă���N���X�́A���̌�ō쐬����UserService�N���X�ł��B

�@conf/application.conf�ł́ASecureSocial�p�ݒ���L�q����uconf�v�t�@�C����include���܂��B

include "securesocial.conf"

�@conf�f�B���N�g����securesocial.conf�����L���e�ŋL�q���܂��傤�Bsmtp�u���b�N��UsernamePasswordProvider���g���ꍇ�Ƀp�X���[�h���}�C���_�Ŏg���ۂ̐ݒ�ł��B

smtp {
    host=smtp.gmail.com     
    #port=25     
    ssl=true
    user="�o���[�U�[���p"     
    password="�o�p�X���[�h�p"
    from="�o���[���A�h���X�p"
}
securesocial {
    onLoginGoTo=/
    onLogoutGoTo=/login
    ssl=false   
    cookie {
      #name=id
      #path=/
      #domain=some_domain
      #httpOnly=true
      #idleTimeoutInMinutes=30
      #absoluteTimeoutInMinutes=720
    }
    facebook {
   �@ authorizationUrl="https://graph.facebook.com/oauth/authorize"
   �@ accessTokenUrl="https://graph.facebook.com/oauth/access_token"
   �@ clientId="�o�A�v���P�[�V����ID�p"
   �@ clientSecret="�o�V�[�N���b�g�L�[�p"
   �@ scope=email
    }
}

�@facebook�u���b�N��clientId��clientSecret�ɁuFacebook�A�v���̓o�^�v�̏͂Ŋm�F�����l��ݒ肵�Ă����܂��B

�@�@�@�@�@�@ 1|2|3 ���̃y�[�W��

Copyright © ITmedia, Inc. All Rights Reserved.

'; this.insertTarget = document.querySelector('#cmsBody .subscription') || document.querySelector('#cmsBody .inner'); }; BodyAdIMSWithCCE.prototype = Object.create(BodyAdContent.prototype); BodyAdIMSWithCCE.prototype.activate = function () { refreshGam('InArtSpecialLink'); } // global reference window.itm = itm; //entry point BodyAdEventBase.polyfill(); const bodyAdManager = BodyAdManager.getInstance(); bodyAdManager.addEventListener(BodyAdManager.EVENTS.READY, function (ev) { bodyAdManager.loadAdvertise(); }); bodyAdManager.init(); })();
�X�|���T�[����̂��m�点PR

���ڂ̃e�[�}

Microsoft  WindowsőO2025
AI for GWjAO
[R[h^m[R[h Zg by IT - ITGWjArWlX̒SŊ􂷂gD
Cloud Native Central by IT - XP[uȔ\͂gD
�V�X�e���J���m�E�n�E �y�����i�r�zPR
���Ȃ��ɂ������߂̋L��PR

RSS�ɂ‚���

�A�C�e�B���f�B�AID�ɂ‚���

���[���}�K�W���o�^

��IT�̃��[���}�K�W���́A �������A���ׂĖ����ł��B���Ѓ��[���}�K�W�������w�ǂ��������B