Move checking credentials to dedicated extensible method.