- JDKがinstall済みであること
- java コマンドに環境変数Pathが通っていること
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import play.api.inject.{QualifierInstance, BindingKey} | |
| import com.google.inject.name.Names | |
| val injector = ??? | |
| injector.instanceOf(BindingKey(classOf[MyType], Some(QualifierInstance(Names.named("my-thing"))))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Call in the scope of a request handler to retrieve basic auth parameters | |
| // if they are present. | |
| def basicAuth()(implicit request: Request[_]): Option[(String, String)] = { | |
| val Basic = "^ *Basic +([^ ].+)$".r | |
| for { | |
| auth <- request.headers.get("Authorization") | |
| Basic(base64) <- Basic.findFirstIn(auth) | |
| decoded <- Option(new BASE64Decoder().decodeBuffer(base64)) | |
| plain <- Option(new String(decoded, "UTF-8")) |