Change-Id: Ib9029ea0c49aa2ee1b6aac6e464ab1f16aef92e8 Signed-off-by: Brad Fitzpatrick <[email protected]>
@@ -20,6 +20,7 @@ type LoginFlags int
const (
LoginDefault = LoginFlags(0)
LoginInteractive = LoginFlags(1 << iota) // force user login and key refresh
+ LoginEphemeral // set RegisterRequest.Ephemeral
)
// Client represents a client connection to the control server.
@@ -368,6 +368,7 @@ func (c *Direct) doLogin(ctx context.Context, opt loginOpt) (mustRegen bool, new
Hostinfo: hostinfo,
Followup: opt.URL,
Timestamp: &now,
+ Ephemeral: (opt.Flags & LoginEphemeral) != 0,
}
if opt.Logout {
request.Expiry = time.Unix(123, 0) // far in the past