I am sorry to ask you again, I did not understand , I am asking which method should I override in auth strategy, which method in auth strategy will I be able to do RequestCycle.get() , get parameter and log in user ?
igor.vaynberg wrote: > > in your auth strategy simply call RequestCycle.get() > > -igor > > On Fri, Dec 11, 2009 at 2:53 PM, fachhoch <[email protected]> wrote: >> >> Please tell me where is there in the below text ? >> >> so check >> there for the parameter being present >> >> I saw the class SimplePageAuthorizationStrategy but could not figure >> out >> where I can check for parameter ? Please tell me more . >> >> >> >> igor.vaynberg wrote: >>> >>> the auth strategy runs before your class is instantiated, so check >>> there for the parameter being present and log the user in. >>> >>> -igor >>> >>> On Fri, Dec 11, 2009 at 1:58 PM, tubin gen <[email protected]> wrote: >>>> My application does not authenticate user ,some external application >>>> authenticates and redirects to my application passing a parameter to >>>> identify the user, using this parameter I have to create a session and >>>> userdetails. >>>> >>>> I am using SimplePageAuthrizationStrategy >>>> >>>> >>>> getSecuritySettings().setAuthorizationStrategy(new >>>> SimplePageAuthorizationStrategy(BasePage.class,getSignInPageClass()){ >>>> �...@override >>>> protected boolean isAuthorized() { >>>> return ((AuditWebSession)Session.get()).isSignedIn(); >>>> //return true; >>>> } >>>> }); >>>> >>>> >>>> here my SignInPage >>>> >>>> public class SSIIntegrationLogin extends WebPage { >>>> >>>> private String sessionId; >>>> >>>> public SSIIntegrationLogin(PageParameters pageParameters) { >>>> >>>> sessionId=getRequestCycle().getRequest().getParameter(Parameters.PARAM_SSI_SESSION_ID); >>>> if (signIn(sessionId)){ >>>> onSignInSucceeded(); >>>> }else{ >>>> onSignInFailed(); >>>> } >>>> } >>>> >>>> protected void onSignInFailed() >>>> { >>>> setRedirect(true); >>>> setResponsePage(SingInFailedPage.class); >>>> } >>>> >>>> >>>> public boolean signIn(String sessionId) >>>> { >>>> return AuthenticatedWebSession.get().signIn(sessionId,""); >>>> } >>>> >>>> protected void onSignInSucceeded() >>>> { >>>> // If login has been called because the user was not yet >>>> // logged in, than continue to the original destination, >>>> // otherwise to the Home page >>>> if (!continueToOriginalDestination()) >>>> { >>>> setRedirect(true); >>>> >>>> setResponsePage(getApplication().getSessionSettings().getPageFactory().newPage( >>>> getApplication().getHomePage(), >>>> (PageParameters)null)); >>>> } >>>> } >>>> >>>> } >>>> >>>> the problem is getting the parameter PARAM_SSI_SESSION_ID the >>>> external >>>> application will redirect to a link like >>>> http://hostname/myapp?PARAM_SSI_SESSION_ID=tert >>>> >>>> >>>> any request to my application will be first cheked by authorization and >>>> becasue the user is not signed in he will be redirected to SingInpage >>>> in >>>> my >>>> case SSIIntegrationLogin , here I need the parameter >>>> PARAM_SSI_SESSION_Id >>>> now I was expecting the above code to work but I never get the >>>> parameter >>>> PARAM_SSI_SESSION_Id , please tell me how can I get this parameter ? >>>> or >>>> is >>>> there any beter way to handle this ? >>>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: [email protected] >>> For additional commands, e-mail: [email protected] >>> >>> >>> >> >> -- >> View this message in context: >> http://old.nabble.com/login-with-a-parameter%2C-no-form-tp26752039p26752667.html >> Sent from the Wicket - User mailing list archive at Nabble.com. >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [email protected] >> For additional commands, e-mail: [email protected] >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > > -- View this message in context: http://old.nabble.com/login-with-a-parameter%2C-no-form-tp26752039p26752817.html Sent from the Wicket - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
