Main Content



Set value of AuthInfo parameter


newinfo = setParameter(authinfo,name,value) sets the value of the parameter name and returns the modified AuthInfo object. If a parameter does not exist, then the method adds it.

If you use this method to set the value of the Scheme property, the method changes the value of the property instead of adding a Scheme parameter. To set the Scheme, type obj.Scheme = value.

If you have a parameter named Encoded, then it must be the only parameter in this object. This usage is for an AuthorizationField object only.

Input Arguments

expand all

AuthInfo, specified as a object.

Parameter name, specified as a string or a character vector.

Name matching is not case-sensitive, but value is case-sensitive. If name matches an existing parameter, but with a different case, then the parameter name is changed to the case of the specified name.

Parameter value, specified a string, character vector, any type that has a string or char method, or a type supported by the name.

Do not enclose a value with double-quotes or insert any escape characters. When you insert this AuthInfo object in an AuthenticateField, AuthenticationInfoField or AuthorizationField object, then the value is converted to a string and quotes and escape characters are automatically inserted as needed. If value is an array of strings or a cell array of character vectors, then its members are separated by spaces.

Output Arguments

expand all

Updated parameter value, returned as any type that was set for the parameter. If value is [], then setParameter does not change the value of the name parameter. However, if value is an empty character vector or string, then the method sets value to an empty string.

Version History

Introduced in R2016b