Refactoring _get_implicit_credentials into component pieces.