> For the complete documentation index, see [llms.txt](https://go.spflow.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://go.spflow.com/auth/overview.md).

# Overview

🔐 SharePoint authentication strategies implemented in Gosip

### 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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
