Library Initiation
Configuring authentication and API client
Last updated
Was this helpful?
Configuring authentication and API client
Last updated
Was this helpful?
Based on authentication provider supported and configured in your SharePoint Farm environment different library might be or not be applicable.
If you have no idea which strategy is used within your farm the question is better be addressed to SharePoint admins.
Let's assume it's SharePoint Online and Add-In Only permissions. Then strategy "github.com/koltyakov/gosip/auth/addin"
sub package should be used.
It could have been SharePoint On-Premise and NTLM and strategy "github.com/koltyakov/gosip/auth/ntlm"
as imported strategy.
Different authentication strategies assumes different credential parameters. Sometimes it can be Username/Password, sometimes CertPath or ClientID/ClientSecret. Please refer a specific strategy documentation for relevalt for the auth type parameters.
Credential can be passed directly in AuthCnfg's struct. Here a sample for addin
:
Now when auth is bound it should be passed to client and Fluent API instance:
Most of the samples starts with sp
assuming configuration described above is already in place.
An anternative is using a configuration file (see ). Which is a JSON containing the same parameters as used with AuthCnfg's struct.