Documentation ¶
Overview ¶
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:
- SharePoint Online + Azure
Index ¶
- type AuthCnfg
- func (c *AuthCnfg) CleanTokenCache() error
- 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) 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 ClientID string `json:"clientId"` // Azure AD App Registration Client ID TenantID string `json:"tenantId"` // Azure AD App Registration Tenant ID }
AuthCnfg - AAD Device Flow auth config structure
Config sample:
{ "siteUrl": "https://contoso.sharepoint.com/sites/test", "clientId": "61367a97-562c-4372-a9ee-b35307abdd26", "tenantId": "3f83fe32-29b2-488e-8c3f-c8b7a2e19a2f" }
func (*AuthCnfg) CleanTokenCache ¶
CleanTokenCache removes token information
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) WriteConfig ¶
WriteConfig writes private config with auth options
Click to show internal directories.
Click to hide internal directories.