1
0
mirror of https://github.com/fumiama/terasu-cloudflared.git synced 2026-06-11 05:30:30 +08:00

AUTH-1531: Named flags for ssh service tokens

This commit is contained in:
Austin Cherry
2019-03-06 13:09:13 -06:00
parent 6ca642e572
commit 58e5e9c9a4
2 changed files with 21 additions and 2 deletions

View File

@@ -22,6 +22,12 @@ func ssh(c *cli.Context) error {
return cli.ShowCommandHelp(c, "ssh")
}
headers := buildRequestHeaders(c.StringSlice("header"))
if c.IsSet("service-token-id") {
headers.Add("CF-Access-Client-Id", c.String("service-token-id"))
}
if c.IsSet("service-token-secret") {
headers.Add("CF-Access-Client-Secret", c.String("service-token-secret"))
}
if c.NArg() > 0 || c.IsSet("url") {
localForwarder, err := config.ValidateUrl(c)