Hi Team, hopefully an easy question: Is there a co...
# support-questions-legacy
d
Hi Team, hopefully an easy question: Is there a convenient way to get the creation time of the session within the fetchValue method inside a session claim validator? I want to use this info to control the lifetime of a session for a specific user/session.
r
hey @DanielAtStruggly
@porcellus can help here
p
hi
not inside
fetchValue
, but you could add a custom claim (which I assume you are doing) and just set it to the right date in the
createNewSession
override
basically you'd have a claim that contains the creation time of the session and the validators checking the lifetime
r
huh?
Maybe @DanielAtStruggly could explain the use case in more detail.
d
I wanna define the lifetime of a specific session by using session claim validators. The ClaimValidator should execute a check within fetchValue to determine if the session is still valid. Does that make sense?
p
Kind of. Why do you want to execute this check inside fetchValue?
d
Is there a better or preferred location to do that check?
p
I'd say the
validate
prop of the validator is better suited for this.
d
Oh damn, I totally agree, the validators should do the trick. Maybe that the reaso why the SessionClaimValidator type exists 😆 . Thanks!
p
happy to help 🙂