Documentation
¶
Index ¶
- Variables
- func ConfigDirs() (user, system string, err error)
- func LogDir() (string, error)
- type ClientOIDCConfig
- type Config
- func (c *Config) CertificateAuthority() ssh.PublicKey
- func (c *Config) CertificateAuthorityURL() string
- func (c *Config) CertificateExpiry() time.Time
- func (c *Config) CertificateValid() bool
- func (c *Config) GetCertificateBytes() ([]byte, error)
- func (c *Config) GetPrivateKeyBytes() ([]byte, error)
- func (c *Config) GetPublicKeyBytes() ([]byte, error)
- func (c *Config) GetRefreshToken() (string, error)
- func (c *Config) HasCertificate() bool
- func (c *Config) HasPrivateKey() bool
- func (c *Config) Oidc() ClientOIDCConfig
- func (c *Config) Save() error
- func (c *Config) SetCertificateBytes(pemBytes []byte) error
- func (c *Config) SetPrivateKeyBytes(pemBytes []byte) error
- func (c *Config) SetRefreshToken(token string) error
- func (c *Config) Signer() (ssh.Signer, error)
- func (c *Config) System() *SystemConfig
- type ConfigOption
- type SystemConfig
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func ConfigDirs ¶
Types ¶
type ClientOIDCConfig ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
func LoadConfig ¶
func LoadConfig(system, user string, opts ...ConfigOption) (*Config, error)
func LoadUserConfigOnly ¶
func LoadUserConfigOnly(name string, opts ...ConfigOption) (*Config, error)
func (*Config) CertificateAuthority ¶
CertificateAuthority returns the CA PublicKey
func (*Config) CertificateAuthorityURL ¶
func (*Config) CertificateExpiry ¶ added in v0.17.7
func (*Config) CertificateValid ¶
func (*Config) GetCertificateBytes ¶
func (*Config) GetPrivateKeyBytes ¶
GetPrivateKeyBytes returns a []byte slice that contains the users unencrypted SSH private key. It is up to the caller to ensure this is handled securely.
func (*Config) GetPublicKeyBytes ¶
func (*Config) GetRefreshToken ¶
func (*Config) HasCertificate ¶
func (*Config) HasPrivateKey ¶
func (*Config) Oidc ¶
func (c *Config) Oidc() ClientOIDCConfig
func (*Config) SetCertificateBytes ¶
func (*Config) SetPrivateKeyBytes ¶
SetPrivateKeyBytes encrypts and persists the PEM private key []byte slice via [Persistence]
func (*Config) SetRefreshToken ¶
func (*Config) System ¶
func (c *Config) System() *SystemConfig
CertificateAuthority returns the CA PublicKey
type ConfigOption ¶ added in v0.17.8
type ConfigOption func(*Config)
Options for *Config
func WithPersistence ¶ added in v0.17.8
func WithPersistence(p persistence.Persistence) ConfigOption
func WithProtector ¶ added in v0.17.8
func WithProtector(p protect.Protector) ConfigOption
type SystemConfig ¶
type SystemConfig struct {
Issuer string `json:"issuer"`
ClientID string `json:"client_id"`
Scopes []string `json:"scopes"`
RedirectURL string `json:"redirect_url"`
CertificateAuthorityURL string `json:"ca_url"`
TrustedCertificateAuthority string `json:"trusted_ca"`
// contains filtered or unexported fields
}
func (*SystemConfig) CertificateAuthority ¶
func (c *SystemConfig) CertificateAuthority() ssh.PublicKey
Click to show internal directories.
Click to hide internal directories.