email to validate
true if the email is authorized to sign in, false otherwise
Suggestion: redirect to an error page with an error message.
routes.YourPlayController.openIdCallback
Implement something like: routes.Controller.homePage()
Implement something like: routes.Controller.homePage()
the place to go after the user is successfully authenticated
Called if the OpenID authentication process fails.
Called if the OpenID authentication process fails.
Note that this is not called if the authorization fails;
see onOpenIdUnauthorized(UserInfo)
in that case.
Called if the user has successfully authenticated, but is not authorized to access the resource/site.
Called if the user has successfully authenticated, but is not authorized to access the resource/site.
authenticated user
the result
OpenID authentication. Only Google is supported for now. Usage:
Set a route in your routes file that leads to the
handleOpenId
method. For example:GET /oid controllers.App.handleOpenId
Set another route that leads to the
openIdCallback
method, for example:GET /openidcb controllers.App.openIdCallback
Define the openIdCallbackRoute of this trait to the route you specified:
To start authentication, send the user to the OpenID route you first defined:
Redirect(routes.App.handleOpenId())
The authenticated email address is stored in the username session variable.