Documentation ¶
Overview ¶
Package adfs implements ADFS Auth (user credentials authentication)
Amongst supported platform versions are:
- SharePoint Online (SPO)
- On-Premise: 2019, 2016, and 2013
Index ¶
- func GetAuth(c *AuthCnfg) (string, int64, error)
- type AuthCnfg
- func (c *AuthCnfg) CleanAuthCache() 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) SetMasterkey(masterKey string)
- func (c *AuthCnfg) WriteConfig(privateFile string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AuthCnfg ¶
type AuthCnfg struct { SiteURL string `json:"siteUrl"` // SPSite or SPWeb URL, which is the context target for the API calls Domain string `json:"domain"` Username string `json:"username"` Password string `json:"password"` RelyingParty string `json:"relyingParty"` AdfsURL string `json:"adfsUrl"` AdfsCookie string `json:"adfsCookie"` // contains filtered or unexported fields }
AuthCnfg - ADFS auth config structure
On-Premises config sample:
{ "siteUrl": "https://www.contoso.com/sites/test", "username": "john.doe@contoso.com", "password": "this-is-not-a-real-password", "relyingParty": "urn:sharepoint:www", "adfsUrl": "https://login.contoso.com", "adfsCookie": "FedAuth" }
On-Premises behind WAP config sample:
{ "siteUrl": "https://www.contoso.com/sites/test", "username": "john.doe@contoso.com", "password": "this-is-not-a-real-password", "relyingParty": "urn:AppProxy:com", "adfsUrl": "https://login.contoso.com", "adfsCookie": "EdgeAccessCookie" }
SharePoint Online config sample:
{ "siteUrl": "https://www.contoso.com/sites/test", "username": "john.doe@contoso.com", "password": "this-is-not-a-real-password" }
func (*AuthCnfg) CleanAuthCache ¶
CleanAuthCache removes auth cache
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.