I called Session.bind() in callback page (from google login) , when redirect to
another page session data disappeared. Below is the log trace:
2018-03-01 12:13:05,516 INFO [southernlight.callbackpage.GoogleReturnPage]
(default task-26) Update User
2018-03-01 12:13:05,517 INFO [southernlight.callbackpage.GoogleReturnPage]
(default task-26) Persist Users : UsersImpl { uid = 1, subject =
113544839275895272134, truename = ShengChe Hsiao, nickname = ShengChe Hsiao,
email = [email protected], created = 2018-01-14 03:25:27.0, allow = 1,
schoolid = google, titles = null, classinfo = null }
2018-03-01 12:13:05,518 INFO [southernlight.callbackpage.GoogleReturnPage]
(default task-26) Temp Session : true
2018-03-01 12:13:05,519 INFO [southernlight.info.WicketSession] (default
task-26) Set User in Session : UsersImpl { uid = 1, subject =
113544839275895272134, truename = ShengChe Hsiao, nickname = ShengChe Hsiao,
email = [email protected], created = 2018-01-14 03:25:27.0, allow = 1,
schoolid = google, titles = null, classinfo = null }
2018-03-01 12:13:05,519 INFO [southernlight.info.WicketSession] (default
task-26) Storeed User : UsersImpl { uid = 1, subject = 113544839275895272134,
truename = ShengChe Hsiao, nickname = ShengChe Hsiao, email =
[email protected], created = 2018-01-14 03:25:27.0, allow = 1, schoolid =
google, titles = null, classinfo = null }
2018-03-01 12:13:05,520 INFO [southernlight.callbackpage.GoogleReturnPage]
(default task-26) Login
2018-03-01 12:13:05,520 INFO [southernlight.info.WicketSession] (default
task-26) User is login : UsersImpl { uid = 1, subject = 113544839275895272134,
truename = ShengChe Hsiao, nickname = ShengChe Hsiao, email =
[email protected], created = 2018-01-14 03:25:27.0, allow = 1, schoolid =
google, titles = null, classinfo = null }
2018-03-01 12:13:05,520 INFO [southernlight.info.WicketSession] (default
task-26) Subject is : 113544839275895272134
2018-03-01 12:13:05,526 INFO [southernlight.info.WicketSession] (default
task-26) Logined
2018-03-01 12:13:05,527 INFO [southernlight.callbackpage.GoogleReturnPage]
(default task-26) Users : UsersImpl { uid = 1, subject = 113544839275895272134,
truename = ShengChe Hsiao, nickname = ShengChe Hsiao, email =
[email protected], created = 2018-01-14 03:25:27.0, allow = 1, schoolid =
google, titles = null, classinfo = null }
2018-03-01 12:13:05,527 INFO [southernlight.callbackpage.GoogleReturnPage]
(default task-26) Is Sign In : true
2018-03-01 12:13:05,528 INFO [southernlight.callbackpage.GoogleReturnPage]
(default task-26) Subject : 113544839275895272134
2018-03-01 12:13:05,528 INFO [southernlight.callbackpage.GoogleReturnPage]
(default task-26) Temp Session : false
2018-03-01 12:13:05,588 INFO [southernlight.info.BasePage] (default task-30)
Users : null
2018-03-01 12:13:05,588 INFO [southernlight.info.BasePage] (default task-30)
Is Sign In : false
2018-03-01 12:13:05,588 INFO [southernlight.info.BasePage] (default task-30)
Subject : null
2018-03-01 12:13:05,588 INFO [southernlight.info.BasePage] (default task-30)
Temp Session : true
2018-03-01 12:13:05,591 INFO [southernlight.admin.users.UserListPage] (default
task-30) User : null
2018-03-01 12:13:05,592 INFO [southernlight.admin.users.UserListPage] (default
task-30)
2018-03-01 12:13:05,594 INFO [stdout] (default task-30)
2018-03-01T12:13:05.594Z DEBUG [default task-30] (#STREAM) - SELECT
`uid`,`subject`,`truename`,`nickname`,`email`,`created`,`allow`,`schoolid`,`titles`,`classinfo`
FROM `videoconferencing`.`Users`, values:[]
2018-03-01 12:13:05,610 INFO [southernlight.info.HeaderPanel] (default
task-30) Panel Sign In User: null
> On 1 Mar 2018, at 19:23, Martin Grigorov <[email protected]> wrote:
>
> On Thu, Mar 1, 2018 at 11:59 AM, <[email protected]
> <mailto:[email protected]>> wrote:
>
>> I called Session#isTemporary() and the value is true, how do I fix it?
>>
>
> Call Session.bind() :-)
>
>
>>
>>> On 1 Mar 2018, at 18:01, Bas Gooren <[email protected]> wrote:
>>>
>>> Hi!
>>>
>>> It sounds like your session is not getting bound. Have you tried
>>> explicitly calling bind()?
>>>
>>> Ps it’s good practice to call replaceSession() on login to prevent
>>> session fixation, so have a look at that, too.
>>>
>>> // Bas
>>>
>>> Verstuurd vanaf mijn iPhone
>>>
>>>> Op 1 mrt. 2018 om 10:44 heeft "[email protected]" <
>> [email protected]> het volgende geschreven:
>>>>
>>>> Dear all
>>>>
>>>> I built a application with parent BasePage, and child page extends it
>> except LoginPage.
>>>> When I try to login, I saw the user data persist in session, but when
>> redirect to another page (extends BasePage) , the session data disappeared
>>>> , how do i concur this?
>>>>
>>>> Thanks
>>>> ---------------------------------------------------------------------
>>>> 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]
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> <mailto:[email protected]>
>> For additional commands, e-mail: [email protected]
>> <mailto:[email protected]>