You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by iv...@apache.org on 2010/12/17 08:29:28 UTC
svn commit: r1050294 -
/wicket/trunk/wicket-auth-roles/src/main/java/org/apache/wicket/authentication/AuthenticatedWebApplication.java
Author: ivaynberg
Date: Fri Dec 17 07:29:27 2010
New Revision: 1050294
URL: http://svn.apache.org/viewvc?rev=1050294&view=rev
Log:
WICKET-3257
Modified:
wicket/trunk/wicket-auth-roles/src/main/java/org/apache/wicket/authentication/AuthenticatedWebApplication.java
Modified: wicket/trunk/wicket-auth-roles/src/main/java/org/apache/wicket/authentication/AuthenticatedWebApplication.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-auth-roles/src/main/java/org/apache/wicket/authentication/AuthenticatedWebApplication.java?rev=1050294&r1=1050293&r2=1050294&view=diff
==============================================================================
--- wicket/trunk/wicket-auth-roles/src/main/java/org/apache/wicket/authentication/AuthenticatedWebApplication.java (original)
+++ wicket/trunk/wicket-auth-roles/src/main/java/org/apache/wicket/authentication/AuthenticatedWebApplication.java Fri Dec 17 07:29:27 2010
@@ -91,7 +91,7 @@ public abstract class AuthenticatedWebAp
if (!AuthenticatedWebSession.get().isSignedIn())
{
// Redirect to intercept page to let the user sign in
- throw new RestartResponseAtInterceptPageException(getSignInPageClass());
+ restartResponseAtSignInPage();
}
else
{
@@ -106,6 +106,17 @@ public abstract class AuthenticatedWebAp
}
/**
+ * Restarts response at sign in page.
+ *
+ * NOTE: this method internally throws a restart response exception, so no code after a call to
+ * this method will be executed
+ */
+ public void restartResponseAtSignInPage()
+ {
+ throw new RestartResponseAtInterceptPageException(getSignInPageClass());
+ }
+
+ /**
* @see org.apache.wicket.protocol.http.WebApplication#newSession(org.apache.wicket.request.Request,
* org.apache.wicket.request.Response)
*/
@@ -114,8 +125,9 @@ public abstract class AuthenticatedWebAp
{
try
{
- return webSessionClassRef.get().getDeclaredConstructor(Request.class).newInstance(
- request);
+ return webSessionClassRef.get()
+ .getDeclaredConstructor(Request.class)
+ .newInstance(request);
}
catch (Exception e)
{