mirror of
https://github.com/cloudflare/cloudflared.git
synced 2025-07-27 20:50:00 +00:00
TUN-5681: Add support for running tunnel using Token
This commit is contained in:
@@ -50,6 +50,21 @@ func (c *Credentials) Auth() pogs.TunnelAuth {
|
||||
}
|
||||
}
|
||||
|
||||
// TunnelToken are Credentials but encoded with custom fields namings.
|
||||
type TunnelToken struct {
|
||||
AccountTag string `json:"a"`
|
||||
TunnelSecret []byte `json:"s"`
|
||||
TunnelID uuid.UUID `json:"t"`
|
||||
}
|
||||
|
||||
func (t TunnelToken) Credentials() Credentials {
|
||||
return Credentials{
|
||||
AccountTag: t.AccountTag,
|
||||
TunnelSecret: t.TunnelSecret,
|
||||
TunnelID: t.TunnelID,
|
||||
}
|
||||
}
|
||||
|
||||
type ClassicTunnelProperties struct {
|
||||
Hostname string
|
||||
OriginCert []byte
|
||||
|
Reference in New Issue
Block a user