I want to check whether session is exist or not before login in Keycloak

Hi Team,
I want to check whether session is exist or not before login in Keycloak.
I thought i am using conditionalAuthenticator in keycloak.But when i use this ConditionalAuthenticator(ApplicationContext conext) context.getUser() always comming as null.
Before this check I logged in and session also created.Dot know why user is comming as null
Could you please help here.

Thanks & Advance,
HariPriya G