# Overview

### Authentication strategies

Auth strategy should be selected corresponding to your SharePoint environment and its configuration.

Import path `strategy "github.com/koltyakov/gosip/auth/{strategy}"`. Where `/{strategy}` stands for a strategy auth package.

| `/azurecert`  | ✅              | ❌ | [sample](/auth/strategies/azure-certificate-auth.md#json)                                                                                                                                                      |
| ------------- | -------------- | - | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `/azurecreds` | ✅              | ❌ | [sample](/auth/strategies/azure-creds-auth.md#json)                                                                                                                                                            |
| `/azureenv`   | ✅              | ❌ | [sample](/auth/strategies/azure-environment-auth.md)                                                                                                                                                           |
| `/device`     | ✅              | ❌ | [sample](/auth/strategies/azure-device-flow.md#auth-configuration-and-usage)                                                                                                                                   |
| `/addin`      | ✅              | ❌ | [sample](/auth/strategies/addin.md#json)                                                                                                                                                                       |
| `/ntlm`       | ❌              | ✅ | [sample](/auth/strategies/ntlm.md#json)                                                                                                                                                                        |
| `/adfs`       | ✅              | ✅ | [spo](/auth/strategies/adfs.md#sharepoint-online-configuration), [on-prem](/auth/strategies/adfs.md#on-premises-configuration), [on-prem (wap)](/auth/strategies/adfs.md#on-premises-behing-wap-configuration) |
| `/fba`        | ❌              | ✅ | [sample](/auth/strategies/fba.md#json)                                                                                                                                                                         |
| `/tmg`        | ❌              | ✅ | [sample](/auth/strategies/tmg.md#json)                                                                                                                                                                         |
| `/saml`       | ❌ (deprecated) | ❌ | [sample](/auth/strategies/addin.md#json)                                                                                                                                                                       |

JSON and struct representations are different in terms of language notations. So credentials parameters names in `private.json` files and declared as structs initiators vary.

### Additional strategies

Gosip supports [custom](/auth/custom-auth.md) (ad hoc) strategies. Some worthy are boiled in [the Sandbox](https://github.com/koltyakov/gosip-sandbox/tree/master/strategies) to be added later on to the main package in a case of the demand.

| Strategy name    | SPO | On-Prem | Credentials sample(s)                                              |
| ---------------- | --- | ------- | ------------------------------------------------------------------ |
| On-Demand        | ✅   | ✅       | [sample](/auth/strategies/on-demand.md#configure-and-usage-sample) |
| Alternative NTLM | ❌   | ✅       | [see more](/auth/strategies/alternative-ntlm.md)                   |

### Secrets encoding

When storing credential in local `private.json` files, which can be handy in local development scenarios, we strongly recommend to encode secrets such as `password` or `clientSecret` using [cpass](/utilits/cpass.md). Cpass converts a secret to an encrypted representation which can only be decrypted on the same machine where it was generated. This minimize incidental leaks, i.e. with git commits.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://go.spflow.com/auth/overview.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
