mirror of
https://github.com/pomerium/pomerium.git
synced 2025-04-30 19:06:33 +02:00
* add cli commands * add jwt cache test * add tcptunnel test * add stdin/stdout support * use cryptutil hash function * doc updates * fix log timestamp
27 lines
450 B
Go
27 lines
450 B
Go
package authclient
|
|
|
|
import (
|
|
"crypto/tls"
|
|
)
|
|
|
|
type config struct {
|
|
tlsConfig *tls.Config
|
|
}
|
|
|
|
func getConfig(options ...Option) *config {
|
|
cfg := new(config)
|
|
for _, o := range options {
|
|
o(cfg)
|
|
}
|
|
return cfg
|
|
}
|
|
|
|
// An Option modifies the config.
|
|
type Option func(*config)
|
|
|
|
// WithTLSConfig returns an option to configure the tls config.
|
|
func WithTLSConfig(tlsConfig *tls.Config) Option {
|
|
return func(cfg *config) {
|
|
cfg.tlsConfig = tlsConfig
|
|
}
|
|
}
|