Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting up HTTP Basic Authentication for all requests

Is there a way to set up HTTP Basic Authentication for all requests in a SoapUI project?

I know it can be done for all requests within a TestSuite but I cant figure out how to do it for all requests in all TestSuites.

like image 866
DisscCoder Avatar asked Aug 23 '11 08:08

DisscCoder


People also ask

How do I set up HTTP basic authentication?

For HTTP basic authentication, each request must include an authentication header, with a base-64 encoded value. Where siteName is the company name you use to log in to Eloqua, and username and password are your Eloqua username and password.

How do I set basic authentication in HTTP header?

Basic Auth:The client sends HTTP requests with the Authorization header that contains the word Basic, followed by a space and a base64-encoded(non-encrypted) string username: password. For example, to authorize as username / Pa$$w0rd the client would send. Note: Base64 encoding does not mean encryption or hashing!


1 Answers

In SOAPUI 5.0 or higher, you can set it on the basicHttpBinding of your service from the Navigation window on the left (I think it's the interface) (it's the parent of all your methods and direct child of the project).

Right click on the interface name and choose "Show Interface Viewer". Then go to the "Service Endpoints" tab. Put your authentication info there. Now you don't have to specify authentication for every method in your service.

After entering the credentials, you need to assign to your requests. (Button "Assign" below the tabs)

like image 178
goku_da_master Avatar answered Sep 20 '22 04:09

goku_da_master