Created
October 8, 2012 10:07
-
-
Save sarveshseri/3851793 to your computer and use it in GitHub Desktop.
Play Gotcha's
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
package controllers.auth | |
import play.api._ | |
import play.api.mvc._ | |
import play.api.data._ | |
import views._ | |
object AuthController extends Controller { | |
/** | |
* Dummy login page. | |
*/ | |
def login = Action { implicit request => | |
Ok(html.auth.login()) | |
} | |
/** | |
* Redirect to Application.index() | |
*/ | |
def redirectToIndex = Action { implicit request => | |
Redirect(controllers.routes.Application.index) | |
} | |
/** | |
* Redirect to login() | |
*/ | |
def redirectToLogin = Action { implicit request => | |
Redirect(controllers.auth.routes.AuthController.index) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment