/
conf.go
96 lines (92 loc) 路 2.23 KB
/
conf.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
package main
type Strategy struct {
Desc string
Docs string
Envs []string
Creds func() [][]string
}
const (
SPO string = "spo"
OnPrem string = "onprem"
)
var allStrats = []string{
"ondemand",
"azurecert",
"azurecreds",
"device",
"saml",
"addin",
"adfs",
"ntlm",
"ntlm2",
"fba",
"tmg",
}
var stratsConf = map[string]Strategy{
"ondemand": {
Desc: "On-Demand (Browser Popup Prompt)",
Docs: "https://go.spflow.com/auth/strategies/on-demand",
Envs: []string{SPO, OnPrem},
Creds: credsResolver.ondemand,
},
"azurecert": {
Desc: "Azure App (Certificate) [SPO]",
Docs: "https://go.spflow.com/auth/strategies/azure-certificate-auth",
Envs: []string{SPO},
Creds: credsResolver.azurecert,
},
"azurecreds": {
Desc: "Azure App (Client Credentials) [SPO]",
Docs: "https://go.spflow.com/auth/strategies/azure-creds-auth",
Envs: []string{SPO},
Creds: credsResolver.azurecreds,
},
"device": {
Desc: "Azure App (Device Login) [SPO]",
Docs: "https://go.spflow.com/auth/strategies/azure-device-flow",
Envs: []string{SPO},
Creds: credsResolver.device,
},
"addin": {
Desc: "Add-In Only (Legacy) [SPO]",
Docs: "https://go.spflow.com/auth/strategies/addin",
Envs: []string{SPO},
Creds: credsResolver.addin,
},
"adfs": {
Desc: "ADFS [SPO, On-Premises]",
Docs: "https://go.spflow.com/auth/strategies/adfs",
Envs: []string{SPO, OnPrem},
Creds: credsResolver.adfs,
},
"fba": {
Desc: "FBA (Legacy) [On-Premises]",
Docs: "https://go.spflow.com/auth/strategies/fba",
Envs: []string{OnPrem},
Creds: credsResolver.user,
},
"ntlm": {
Desc: "NTLM [On-Premises]",
Docs: "https://go.spflow.com/auth/strategies/ntlm",
Envs: []string{OnPrem},
Creds: credsResolver.ntlm,
},
"ntlm2": {
Desc: "NTLM (Alternative) [On-Premises]",
Docs: "https://go.spflow.com/auth/strategies/alternative-ntlm",
Envs: []string{OnPrem},
Creds: credsResolver.ntlm,
},
"saml": {
Desc: "SAML (User Credentials) [SPO]",
Docs: "https://go.spflow.com/auth/strategies/saml",
Envs: []string{SPO},
Creds: credsResolver.saml,
},
"tmg": {
Desc: "TMG (Legacy) [On-Premises]",
Docs: "https://go.spflow.com/auth/strategies/tmg",
Envs: []string{OnPrem},
Creds: credsResolver.user,
},
}