Authentication in REST controllers

Hello

I’m currently trying to set up some REST controllers which are authenticated by jwt.
I would like to set my authentication in the security context, but it seems like no matter what i try i end up with “No VaadinSession bound to current thread”.
Is there any way around this or should this be done in another way?