1)Data Access in SharePoint And Remote App :Inbound scenarios
Inbound data connectivity
- OAuth: An open protocol that enables secure authorization in a simple and standard way.
AppOnly Policy : enables users to approve an application to act on their behalf without sharing their user name and password.
Server Side Code :You can use OAuth with server-side code. It is a good option if you need to run a non-interactive process, or if you need to elevate privileges to other than those of the logged-on user. For information about OAuth, see Authorization and authentication for apps in SharePoint 2013.
Client Side Code : This is a good option if you prefer your app code to run in the client rather than in the server, or if there are connectivity barriers, such as firewalls, between SharePoint and your remote infrastructure. For more information, see How to: Access SharePoint 2013 data from remote apps using the cross-domain library.
(Click following image )