Last change
on this file since 822 was 822, checked in by yakumo.izuru, 22 months ago |
Prefer immortal.run over runit and rc.d, use vendored modules
for convenience.
Signed-off-by: Izuru Yakumo <yakumo.izuru@…>
|
File size:
815 bytes
|
Line | |
---|
1 | package pq
|
---|
2 |
|
---|
3 | // NewGSSFunc creates a GSS authentication provider, for use with
|
---|
4 | // RegisterGSSProvider.
|
---|
5 | type NewGSSFunc func() (GSS, error)
|
---|
6 |
|
---|
7 | var newGss NewGSSFunc
|
---|
8 |
|
---|
9 | // RegisterGSSProvider registers a GSS authentication provider. For example, if
|
---|
10 | // you need to use Kerberos to authenticate with your server, add this to your
|
---|
11 | // main package:
|
---|
12 | //
|
---|
13 | // import "github.com/lib/pq/auth/kerberos"
|
---|
14 | //
|
---|
15 | // func init() {
|
---|
16 | // pq.RegisterGSSProvider(func() (pq.GSS, error) { return kerberos.NewGSS() })
|
---|
17 | // }
|
---|
18 | func RegisterGSSProvider(newGssArg NewGSSFunc) {
|
---|
19 | newGss = newGssArg
|
---|
20 | }
|
---|
21 |
|
---|
22 | // GSS provides GSSAPI authentication (e.g., Kerberos).
|
---|
23 | type GSS interface {
|
---|
24 | GetInitToken(host string, service string) ([]byte, error)
|
---|
25 | GetInitTokenFromSpn(spn string) ([]byte, error)
|
---|
26 | Continue(inToken []byte) (done bool, outToken []byte, err error)
|
---|
27 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.