Altova MapForce Server 2024 Advanced Edition

addCredentialProperty

Home Prev Top Next

Adds a property to the current credential (for example, the username, the password, or both). The first argument specifies the property name, and the second argument specifies the property value. Valid property names: username, password. In MapForce Server Advanced Edition, the property name oauth:token is additionally supported.

 

This method must be called after calling beginCredential() and before calling endCredential(). As an alternative to calling this method, you can also call addCredentialPropertiesFromMap().

 

Signature

addCredentialProperty(arg0:String, arg1:String) -> void

Generic signature

 

Parameters

Name

Type

Description

arg0

String

The name of the credential property (for example, "username" or "password").

arg1

String

The value of the credential property.

 

Examples

The following code listing illustrates how to declare a credential called "mycredential". The credential name must be the one given to the credential in MapForce at design time.

 

//Create a MapForce Server object

com.altova.mapforceserver.MapForceServer objMFS = new com.altova.mapforceserver.MapForceServer();

         

objMFS.beginCredential("mycredential");

objMFS.addCredentialProperty("username", "altova");

objMFS.addCredentialProperty("password", "b45ax78!");

objMFS.endCredential();

© 2017-2023 Altova GmbH