Documentation ¶
Overview ¶
Package azureclient implements AAD Client Auth Flow Attention! This auth flow is not supported for SharePoint, you'd see "401 Unauthorized :: Unsupported app only token." See more:
Amongst supported platform versions are:
- SharePoint Online + Azure
Index ¶
- type AuthCnfg
- func (c *AuthCnfg) GetAuth() (string, int64, error)
- func (c *AuthCnfg) GetSiteURL() string
- func (c *AuthCnfg) GetStrategy() string
- func (c *AuthCnfg) ParseConfig(byteValue []byte) error
- func (c *AuthCnfg) ReadConfig(privateFile string) error
- func (c *AuthCnfg) SetAuth(req *http.Request, httpClient *gosip.SPClient) error
- func (c *AuthCnfg) SetMasterkey(masterKey string)
- func (c *AuthCnfg) WriteConfig(privateFile string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthCnfg ¶
type AuthCnfg struct { SiteURL string `json:"siteUrl"` // SPSite or SPWeb URL, which is the context target for the API calls TenantID string `json:"tenantId"` // Azure Tenant ID ClientID string `json:"clientId"` // Azure Client ID ClientSecret string `json:"clientSecret"` // Azure Client Secret // contains filtered or unexported fields }
AuthCnfg - AAD Client credentials Auth Flow
Config sample:
{ "siteUrl": "https://contoso.sharepoint.com/sites/test", "tenantId": "e4d43069-8ecb-49c4-8178-5bec83c53e9d", "clientId": "628cc712-c9a4-48f0-a059-af64bdbb4be5", "clientSecret": ".m.Dw5Gtdih-J62KVI0sA44HJP-vYc.xCS" }
func (*AuthCnfg) GetSiteURL ¶
GetSiteURL gets SharePoint siteURL
func (*AuthCnfg) GetStrategy ¶
GetStrategy gets auth strategy name
func (*AuthCnfg) ParseConfig ¶
ParseConfig parses credentials from a provided JSON byte array content
func (*AuthCnfg) ReadConfig ¶
ReadConfig reads private config with auth options
func (*AuthCnfg) SetMasterkey ¶
SetMasterkey defines custom masterkey
func (*AuthCnfg) WriteConfig ¶
WriteConfig writes private config with auth options
Click to show internal directories.
Click to hide internal directories.