mirror of
https://github.com/davidallendj/opaal.git
synced 2025-12-20 03:27:02 -07:00
Refactoring and more implementation
This commit is contained in:
parent
ac80ba929c
commit
eb43261b91
5 changed files with 293 additions and 229 deletions
|
|
@ -36,15 +36,7 @@ func RandomString(n int) string {
|
|||
return string(b)
|
||||
}
|
||||
|
||||
func BuildAuthorizationUrl(authEndpoint string, clientId string, redirectUri []string, state string, responseType string, scope []string) string {
|
||||
return authEndpoint + "?" + "client_id=" + clientId +
|
||||
"&redirect_uri=" + EncodeURL(strings.Join(redirectUri, ",")) +
|
||||
"&response_type=" + responseType +
|
||||
"&state=" + state +
|
||||
"&scope=" + strings.Join(scope, "+")
|
||||
}
|
||||
|
||||
func EncodeURL(s string) string {
|
||||
func URLEscape(s string) string {
|
||||
return url.QueryEscape(s)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue