Added configurable http authentication resolver

This PR allows to provide a specific resolver for http basic/digest auth .
The above 2 conditions can be combined to one (just the last); PHP will not raise errors when attempting to resolve a nested key, even if multiple levels are not present. (I can resolve this on merge.)