Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
gakuzzzz committed Jul 5, 2015
1 parent a41dfb6 commit ea86dfa
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 26 deletions.
20 changes: 8 additions & 12 deletions README.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Play2.x module for Authentication and Authorization [![Build Status](https://sec

このモジュールは __Play2.x____Scala__版を対象としています。

Play2.3.0 で動作確認をしています。
Play2.4.2 で動作確認をしています。

動機
---------------------------------------
Expand Down Expand Up @@ -36,6 +36,7 @@ Play2.3.0 で動作確認をしています。
以前のバージョン
---------------------------------------

Play2.3.x 向けの使用方法は [0.13.2 README](https://github.com/t2v/play2-auth/blob/release0.13.2/README.ja.md)をご参照ください。
Play2.2.x 向けの使用方法は [0.11.0 README](https://github.com/t2v/play2-auth/blob/release0.11.0/README.ja.md)をご参照ください。
Play2.1.x 向けの使用方法は [0.10.1 README](https://github.com/t2v/play2-auth/blob/release0.10.1/README.ja.md)をご参照ください。
Play2.0.x 向けの使用方法は [0.7 README](https://github.com/t2v/play2-auth/blob/release0.7/README.ja.md)をご参照ください。
Expand All @@ -52,15 +53,17 @@ Play2.1以前をお使いの方へ

`Build.scala` もしくは `build.sbt` にライブラリ依存性定義を追加します。

"jp.t2v" %% "play2-auth" % "0.13.2",
"jp.t2v" %% "play2-auth-test" % "0.13.2" % "test"
"jp.t2v" %% "play2-auth" % "0.14.0",
"jp.t2v" %% "play2-auth-test" % "0.14.0" % "test",
play.sbt.Play.autoImport.cache // デフォルトのIdContainerを使う場合のみ必要です

For example: `Build.scala`

```scala
val appDependencies = Seq(
"jp.t2v" %% "play2-auth" % "0.13.2",
"jp.t2v" %% "play2-auth-test" % "0.13.2" % "test"
"jp.t2v" %% "play2-auth" % "0.14.0",
"jp.t2v" %% "play2-auth-test" % "0.14.0" % "test",
play.sbt.Play.autoImport.cache // デフォルトのIdContainerを使う場合のみ必要です
)
```

Expand Down Expand Up @@ -139,13 +142,6 @@ For example: `Build.scala`
Future.successful(Forbidden("no permission"))
}

/**
* 互換性の為に残されているメソッドです。
* 将来のバージョンでは取り除かれる予定です。
* authorizationFailed(RequestHeader, User, Option[Authority]) を override してください。
*/
def authorizationFailed(request: RequestHeader)(implicit ctx: ExecutionContext): Future[Result] = throw new AssertionError

/**
* 権限チェックのアルゴリズムを指定します。
* 任意の処理を記述してください。
Expand Down
23 changes: 9 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ Play2x-Auth provides a way of composition.
Previous Version
---------------------------------------

for Play2.3.x, Please see [previous version 0.11.0 README](https://github.com/t2v/play2-auth/blob/release0.13.2/README.md)

for Play2.2.x, Please see [previous version 0.11.0 README](https://github.com/t2v/play2-auth/blob/release0.11.0/README.md)

for Play2.1.x, Please see [previous version 0.10.1 README](https://github.com/t2v/play2-auth/tree/release0.10.1)
Expand All @@ -57,22 +59,22 @@ Installation

Add dependency declarations into your `Build.scala` or `build.sbt` file:

* __for Play2.3.x__
* __for Play2.4.x__

"jp.t2v" %% "play2-auth" % "0.13.2",
"jp.t2v" %% "play2-auth-test" % "0.13.2" % "test"
"jp.t2v" %% "play2-auth" % "0.14.0",
"jp.t2v" %% "play2-auth-test" % "0.14.0" % "test",
play.sbt.Play.autoImport.cache // only when you use default IdContainer

For example your `Build.scala` might look like this:

```scala
val appDependencies = Seq(
"jp.t2v" %% "play2-auth" % "0.13.2",
"jp.t2v" %% "play2-auth-test" % "0.13.2" % "test"
"jp.t2v" %% "play2-auth" % "0.14.0",
"jp.t2v" %% "play2-auth-test" % "0.14.0" % "test",
play.sbt.Play.autoImport.cache
)
```

You don't need to create a `play.plugins` file.

Usage
---------------------------------------

Expand Down Expand Up @@ -148,13 +150,6 @@ Usage
Future.successful(Forbidden("no permission"))
}

/**
* This method is kept for compatibility.
* It will be removed in a future version
* Override `authorizationFailed(RequestHeader, User, Option[Authority])` instead of this
*/
def authorizationFailed(request: RequestHeader)(implicit ctx: ExecutionContext): Future[Result] = throw new AssertionError

/**
* A function that determines what `Authority` a user has.
* You should alter this procedure to suit your application.
Expand Down

0 comments on commit ea86dfa

Please sign in to comment.