-
Notifications
You must be signed in to change notification settings - Fork 805
/
docs.go
33 lines (30 loc) · 883 Bytes
/
docs.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
package auth
import "github.com/Jeffail/benthos/v3/lib/x/docs"
// BasicAuthFieldSpec returns a basic authentication field spec.
func BasicAuthFieldSpec() docs.FieldSpec {
return docs.FieldAdvanced("basic_auth",
"Allows you to specify basic authentication.",
map[string]interface{}{
"enabled": true,
"username": "foo",
"password": "bar",
},
)
}
// FieldSpecs returns a map of field specs for an auth type.
func FieldSpecs() docs.FieldSpecs {
return docs.FieldSpecs{
docs.FieldAdvanced("oauth",
"Allows you to specify open authentication.",
map[string]interface{}{
"enabled": true,
"consumer_key": "foo",
"consumer_secret": "bar",
"access_token": "baz",
"access_token_secret": "bev",
"request_url": "http://thisisjustanexample.com/dontactuallyusethis",
},
),
BasicAuthFieldSpec(),
}
}