Add security to a Web Service script
This task describes how to add set the security for your Web Service calls. For details about Web Services security, see Setting security overview.
-
Insert a new Web Services Security Step
-
Place the cursor at the point at which you want to add the security settings. In most cases, it is best to place it in vuser_init so that the security scope is applied to the whole script. To apply the security for specific calls, place it at the relevant location.
-
Right-click and select Insert > New Step. In the Steps Toolbox, under the Web Services functions, double-clickweb_service_set_security. The Set Security Properties box opens.
-
-
Add a security token - optional
-
Click Security Tokens and select a token type. For details, see Security tokens and encryption.
-
In the Token Name box, assign a name for the token to be used by VuGen in identifying the token.
Add any relevant information, such as User Name and Password for the UserName token type.
-
-
Add a message signature or encryption - optional
-
On the Set Security Properties box toolbar, click Add Message Signature or Add Message Encryption.
-
In the Signing/Encryption token box, select a token to use with the message signature or encryption. Both signatures and encryptions require you to specify a token previously defined as the signing/encrypting token. See Add a security token - optional above.
-
Under What to sign, specify a target token, or leave the field blank to apply the signature or encryption to the whole message body. For details, see Security tokens and encryption.
-
-
Cancel the security settings - optional
To cancel the security settings at a specific point within the script, add a web_service_cancel_security step at the relevant point.
See also: