mirror of
https://github.com/pomerium/pomerium.git
synced 2025-06-03 11:22:45 +02:00
TCP client command (#1696)
* add cli commands * add jwt cache test * add tcptunnel test * add stdin/stdout support * use cryptutil hash function * doc updates * fix log timestamp
This commit is contained in:
parent
4fbbf28a16
commit
61ab4e4837
12 changed files with 923 additions and 0 deletions
27
internal/authclient/config.go
Normal file
27
internal/authclient/config.go
Normal file
|
@ -0,0 +1,27 @@
|
|||
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
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue