Get the incoming light intensity in fragment shader

As the title says, I want to get the incoming light intensity and color per pixel for my custom post process.
I understand from the forum below that I can get diffuse and specular, but don’t know how to do the subject. How can I do this?

Incoming light is basically passing the lights uniforms or ubo containing all the setup info. You d need to bind all of them to your custom shader.