This file contains 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
//Trait that bridges between slick and Play2-auth. Just mixin with controllers | |
trait Auth2SlickBridge { | |
self: StackableController => | |
def AuthAction[A](p: BodyParser[A], params: (RequestAttributeKey[_], Any)*)(f: RequestWithAttributes[A] => Action[A]): Action[A] = { | |
AsyncStack(p, params:_*) { implicit rs => | |
f(rs).apply(rs) | |
} | |
} |