Documentation ¶
Index ¶
- type Host
- type User
- func (u *User) CheckAuthorization(ctx context.Context) (bool, string, error)
- func (u *User) RequestCerts(ctx context.Context, userId string, duration time.Duration) error
- func (u *User) SetKeysDir(keysDir string)
- func (u *User) SetPrincipals(principals []string)
- func (u *User) SetRemoteUsername(username string)
- func (u *User) SetUsername(username string)
- func (u *User) UpdateHostCertAuthority(knownHostsFile string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Host ¶
type Host struct { Client protocol.CertClient Dryrun bool PSKStore accord.PSKStore Salt string DeploymentId string KeysDir string Hostnames []string UUID []byte }
Host has all fields public because most of them are required to be set by the caller in one way or another anyway and duplicating the fields in another input object is just waste to only be used once
func NewHost ¶
func NewHost(client protocol.CertClient) *Host
func (*Host) Authenticate ¶
For now the response doesn't do a proper challenge auth
func (*Host) RequestCerts ¶
It's always in the future, so not giving the user start time option
func (*Host) UpdateUserCertAuthority ¶
type User ¶
type User struct {
// contains filtered or unexported fields
}
func NewUser ¶
func NewUser(client protocol.CertClient) *User
func NewUserWithToken ¶
func NewUserWithToken(client protocol.CertClient, token *oauth2.Token) *User
func (*User) CheckAuthorization ¶
Validate the Oauth2.0 token against the server it needs to have been generated by the same clientID and have valid expiry date, etc Maybe use a nonce or something, but I can't think of reasonable things to send here, so boolean so that the backend doesn't get bad requests
func (*User) RequestCerts ¶
func (*User) SetKeysDir ¶
func (*User) SetPrincipals ¶
func (*User) SetRemoteUsername ¶
func (*User) SetUsername ¶
func (*User) UpdateHostCertAuthority ¶
Click to show internal directories.
Click to hide internal directories.