Accessing Scene lights in a custom shader

Hi, I need to access scene lights in shader for illumination calculations. So, how to access directional and point lights(and their properties) used in the scene in the custom shader.

Also lights in three js (like OPEN GL) have three components - ambient, diffuse and specular, How can I access each component seperately in the shader.