add update_credential API

Change-Id: I9dae18c8c8d1c63dc227b93abed3f21895ec2416