change password using dotcmis
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2016 08:07 AM
Hi ,
I facing trouble while posting data to change password some one know whate parameter required to post for change password through DotCmis.
I had worked on this kindly see the below code for refrance..
HttpWebRequest webReq = (HttpWebRequest)WebRequest.Create("http://ServerIp:8080/alfresco/service/api/people/changepassword/" + UserName);
// use default credentials
webReq.UseDefaultCredentials = true; webReq.Headers.Add("Authorization", authorization);
// sets the method as a get
webReq.Method = "POST";
string RepairPassword = Password.Replace(@"/", "");
// string NewPassword = RepairPassword.Replace(@"=", "");
string postData = "{ userName:" + Convert.ToString(UserName) + ", password: '" + Convert.ToString(RepairPassword) + "', firstName:" + Convert.ToString(UserName) + ", lastName:'NA', email:" + UserName + ", disableAccount: false, quote: -1, groups: [] }";
byte[] byteArray = Encoding.UTF8.GetBytes(postData);
// Set the ContentType property of the WebRequest.
webReq.ContentType = "application/json";
// Set the ContentLength property of the WebRequest.
webReq.ContentLength = byteArray.Length;
// Get the request stream.
Stream dataStream = webReq.GetRequestStream();
// Write the data to the request stream.
dataStream.Write(byteArray, 0, byteArray.Length);
// Close the Stream object.
dataStream.Close();
Thanks & Regards,
Shivkumar Swami
- Labels:
-
Archive
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2016 01:04 PM
you cannot do that using cmis as it is not part of cmis specification.
Using CMIS with Alfresco | Alfresco Documentation
you need to use webscript to achieve that.
