If you look at the documentation for token() you will see that this method is responsible
for extracting the authentication token from the request. So at this point, the authentication
is still in progress and there is no information regarding User and its role.
Could you please give us some details as to what you are trying to do? so we can help you better.