chore(watchblob): Prepare for depot merge
This commit is contained in:
parent
1c3ea48da9
commit
24b075bdeb
5 changed files with 0 additions and 1 deletions
37
fun/watchblob/urls.go
Normal file
37
fun/watchblob/urls.go
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net/url"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
const urlFormat string = "https://%s%s"
|
||||
const uriFormat = "/?%s"
|
||||
|
||||
func templateChallengeTriggerUri(username *string, password *string) string {
|
||||
v := url.Values{}
|
||||
v.Set("action", "sslvpn_logon")
|
||||
v.Set("style", "fw_logon_progress.xsl")
|
||||
v.Set("fw_logon_type", "logon")
|
||||
v.Set("fw_domain", "Firebox-DB")
|
||||
v.Set("fw_username", *username)
|
||||
v.Set("fw_password", *password)
|
||||
|
||||
return fmt.Sprintf(uriFormat, v.Encode())
|
||||
}
|
||||
|
||||
func templateResponseUri(logonId int, token *string) string {
|
||||
v := url.Values{}
|
||||
v.Set("action", "sslvpn_logon")
|
||||
v.Set("style", "fw_logon_progress.xsl")
|
||||
v.Set("fw_logon_type", "response")
|
||||
v.Set("response", *token)
|
||||
v.Set("fw_logon_id", strconv.Itoa(logonId))
|
||||
|
||||
return fmt.Sprintf(uriFormat, v.Encode())
|
||||
}
|
||||
|
||||
func templateUrl(baseUrl *string, uri string) string {
|
||||
return fmt.Sprintf(urlFormat, *baseUrl, uri)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue