What is the alternative for deprecated method TokenVerifier.realmUrl()


I am trying to verify the AccessToken using below code -

TokenVerifier verifier = TokenVerifier.create(StringAccessToken, AccessToken.class).withDefaultChecks();
PublicKey publicKey = getRealmPublicKey(verifier.getHeader());
return verifier.realmUrl(“someStringUrl”).publicKey(publicKey).verify().getToken();

But seems a realmUrl() method is deprecated. Can you please help with alternative solution for this?

or can you suggest an effective way to verify access token ?