I need to access CRM odata REST API for Integration. I have a php cron job for syncing data from CRM. When I hit the endpoint of CRM WEB API from browser it redirect to the following adfs server whith the following query string wa=wsignin1.0&wtrealm=internal.crm.org.com:5443/&wctx=rm=1&id=&ru=%%2fdefault.aspx&wct=2016-11-02T07:15:47Z&wauth=urn:federation:authentication:windows
and a window is shown to authenticate using username, and password.
So my question is how to authenticate with the resources server? Microsoft point me to this page msdn.microsoft.
Microsoft said dynamics 365 is using three different security models (claims, active dirctory, and auth2 authentications)