Differentiate Callers in WCF Service

I am working on a WCF Service that returns the Status for a Device.

A Device has multiple Status for different Companies. I need to develop a WCF Service that allows a Company to retrieve the Status for their Company (and only theirs).

What is the best way, to differentiate between this companies in WCF.

As far as i can see, i have 3 options here:

  1. use the calling username
  2. An Identifier needs to be passed to the Web service
  3. Different Web service for all Companies

What would be the preferred way to go, or are there any other options?

//edit: I found another option: Identify the caller by certificate.


You may want to look into token based authentication.

The process would be something like this.

  1. User sends credentials to an authentication endpoint. If successful, a token is returned.

  2. When user wishes to check the status of the device, they pass the token in the header.

  3. The receiving service verifies that the token is valid.

  4. Using the token it retrieves information about the customer, retrieves the relevant data and returns it to the client.

Trả lời

Email của bạn sẽ không được hiển thị công khai. Các trường bắt buộc được đánh dấu *