Created
May 2, 2018 14:56
-
-
Save jmkoni/017847a7947366f7ee415777323a1e66 to your computer and use it in GitHub Desktop.
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
import org.scalatra.ScalatraServlet | |
class MyServlet extends ScalatraServlet { | |
get("/") { | |
authenticateCookie(request) match { | |
case Some(_) => { | |
views.html.hello() | |
} | |
case None => { | |
views.html.error("Cookie is invalid.") | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment