function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
CarlBCarlB 

Using client certificates with webservice methods

If I create a webservice method in Apex code is there any way that I can use client certificates to autheticate the inbound web service calls?

For example, suppose I have the following class:
 
global class MyWebService {
	    webService static Id makeContact(String lastName, Account a) {
	        Contact c = new Contact(lastName = 'Weissman', AccountId = a.Id);
	        insert c;
	        return c.id;
	    }
}
Obviously, if I enable this in Sites, then someone could call this method from outside of Salesforce.  If this web service was hosted in my own web server, I could require all clients to provide a certificate (two-way SSL).  Is there any way that I do the same for my web service in Salesforce?

Regards,

Carl