はじめに 今回はPlayframework2.0での基本的な認証プロセスを紹介します。 コーディング secured.java package controllers; import play.mvc.Result; import play.mvc.Http.Context; import play.mvc.Security.Authenticator; public class Secured extends Authenticator{ @Override public String getUsername(Context ctx) { /* nullを返すと認証していないものとみなす。 * 今回は単純にセッション中にIDがあれば認証されているものとみなすが、 * 本来ならば、認証後にトークンを発行してここでトークンチェックを行うべき。 */ return ctx.session().