Documentation
¶
Overview ¶
Package gosip is pure Go library for dealing with SharePoint unattended authentication and API consumption.
It supports a variety of different authentication strategies such as:
- SAML based with user credentials
- Add-in only permissions
- Azure AD auth strategies (via extensions https://go.spflow.com/auth/custom-auth)
- ADFS user credentials
- NTLM/NTLM v2 windows auth
- Auth to SharePoint behind a reverse proxy (TMG, WAP)
- Form-based authentication (FBA)
- Web login/On-Demand auth (via extension https://go.spflow.com/auth/custom-auth/on-demand)
Amongst supported platform versions are:
- SharePoint Online (SPO)
- On-Premise: 2019, 2016, and 2013
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AuthCnfg ¶
type AuthCnfg interface {
// GetAuth Authentication initializer (token/cookie/header, expiration, error)
// to support capability for exposing tokens for external tools
// e.g. as of this sample project https://github.com/koltyakov/spvault
GetAuth(ctx context.Context) (string, int64, error)
// SetAuth Authentication middleware fabric
// applies round tripper or enriches requests with authentication and metadata
SetAuth(req *http.Request, client *SPClient) error
ParseConfig(jsonConf []byte) error // Parses credentials from a provided JSON byte array content
ReadConfig(configPath string) error // Reads credentials from storage
GetSiteURL() string // SiteURL getter method
GetStrategy() string // Strategy code getter
}
AuthCnfg is an abstract auth config interface, allows different authentications strategies' dependency injection
type HookHandlers ¶
type HookHandlers struct {
OnError func(event *HookEvent) // when error appeared
OnRetry func(event *HookEvent) // before retry request
OnRequest func(event *HookEvent) // before request is sent
OnResponse func(event *HookEvent) // after response is received
}
HookHandlers struct to configure events handlers
type SPClient ¶
type SPClient struct {
http.Client
AuthCnfg AuthCnfg // authentication configuration interface
ConfigPath string // private.json location path, optional when AuthCnfg is provided with creds explicitly
RetryPolicies map[int]int // allows redefining error state requests retry policies
Hooks *HookHandlers // hook handlers definition
}
SPClient : SharePoint HTTP client struct
Directories
¶
| Path | Synopsis |
|---|---|
|
Package api represents Fluent API for SharePoint object model
|
Package api represents Fluent API for SharePoint object model |
|
addin
Package addin implements AddIn Only Auth
|
Package addin implements AddIn Only Auth |
|
adfs
Package adfs implements ADFS Auth (user credentials authentication)
|
Package adfs implements ADFS Auth (user credentials authentication) |
|
anon
Package anon provides anonymous "strategy" no auth mechanisms are applied to the requests
|
Package anon provides anonymous "strategy" no auth mechanisms are applied to the requests |
|
azurecert
Package azurecert implements AAD Certificate Auth Flow See more:
|
Package azurecert implements AAD Certificate Auth Flow See more: |
|
azurecreds
Package azurecreds implements AAD Username/Password Auth Flow See more:
|
Package azurecreds implements AAD Username/Password Auth Flow See more: |
|
azureenv
Package azureenv implements AAD Environment-Based Auth Flow See more:
|
Package azureenv implements AAD Environment-Based Auth Flow See more: |
|
device
Package device implements AAD Device Auth Flow See more: https://docs.microsoft.com/en-us/azure/developer/go/azure-sdk-authorization#use-device-token-authentication Amongst supported platform versions are:
|
Package device implements AAD Device Auth Flow See more: https://docs.microsoft.com/en-us/azure/developer/go/azure-sdk-authorization#use-device-token-authentication Amongst supported platform versions are: |
|
fba
Package fba implements FBA (Form-based authentication)
|
Package fba implements FBA (Form-based authentication) |
|
ntlm
Package ntlm implements NTLM Auth (NTLM handshake)
|
Package ntlm implements NTLM Auth (NTLM handshake) |
|
saml
Package saml implements SAML Auth (SharePoint Online user credentials authentication)
|
Package saml implements SAML Auth (SharePoint Online user credentials authentication) |
|
tmg
Package tmg implements FBA authentication behind TMG (Microsoft Forefront Threat Management Gateway)
|
Package tmg implements FBA authentication behind TMG (Microsoft Forefront Threat Management Gateway) |
|
cmd
|
|
|
cpass
command
|
|
|
ggen
command
|
|
|
pprof
command
|
|
|
test
command
|
|
|
Package csom helps building CSOM XML requests
|
Package csom helps building CSOM XML requests |
|
test
|
|
Click to show internal directories.
Click to hide internal directories.
