When an optometrist looks through the lens of the eye, they are examining the retina. Retina scanning is rarely used anymore because the process can cause discomfort and requires multiple attempts. For this reason, it has fallen out of favor and has been replaced with iris scanning. If you hear anyone talking about an identification method that uses the retina, they almost certainly mean the iris.
Iris scanning uses an image of the iris - the colored part of the eye surrounding the pupil. As opposed to retina scanning, iris scanning is easy, fast and painless. Images of the iris are captured with an ordinary camera while being illuminated with near infrared (NIR) light. This allows the detailed texture of even dark brown eyes to be captured.