Implementing basic authentication when connecting to jenkins

With authentication in Jenkins turned on, we must pass username and password using basic authentication.