Skip to content

Instantly share code, notes, and snippets.

@mmurray
Created September 2, 2014 20:02
Show Gist options
  • Save mmurray/9dfe80e269972f470558 to your computer and use it in GitHub Desktop.
Save mmurray/9dfe80e269972f470558 to your computer and use it in GitHub Desktop.
scala example
import play.api.mvc.RequestHeader
def getUserId()(implicit request: RequestHeader) = {
request.cookies.get("uid").map(_.value.toLong).filter(_ > 0)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment