Providing basic access control

The IDataSource defines a method called CanViewAsync, which allows the data source to decline access to the source unless certain prerequisites are met. For our first implementation, we will assume that anyone who has been granted access to the concentrator, also has access to the data source:

public Task<bool> CanViewAsync(RequestOrigin Caller) 
{ 
   return Task.FromResult<bool>(true); 
} 

The RequestOrigin object will contain the XMPP address (or JID) of the entity making the request to access the data source. It also contains any service, device, or user tokens used in the call. Access can be granted or rejected based on any of these identities.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.133.111.85