Commit 55ff887b authored by liugaoling's avatar liugaoling

authorization

parent 10c5284b
...@@ -7,7 +7,7 @@ import ( ...@@ -7,7 +7,7 @@ import (
func main() { func main() {
// utils.HttpLogin("lglhope", "123456789") // utils.HttpLogin("lglhope", "123456789")
var authRequestInfo authz.AuthRequestInfo var authRequestInfo *authz.AuthRequestInfo
authRequestInfo.Account = "wln" authRequestInfo.Account = "wln"
authRequestInfo.Name = "wln/apple" authRequestInfo.Name = "wln/apple"
authRequestInfo.Service = "wln" authRequestInfo.Service = "wln"
......
...@@ -64,7 +64,7 @@ func HttpLogin(username string, password string) (bool, error) { ...@@ -64,7 +64,7 @@ func HttpLogin(username string, password string) (bool, error) {
return true, nil return true, nil
} }
func HttpAuth(authReqInfo authz.AuthRequestInfo) bool { func HttpAuth(authReqInfo *authz.AuthRequestInfo) bool {
client := &http.Client{} client := &http.Client{}
authUrl := "http://47.57.4.97/c3ce/dockerimage/authorization" authUrl := "http://47.57.4.97/c3ce/dockerimage/authorization"
bytesData, _ := json.Marshal(authReqInfo) bytesData, _ := json.Marshal(authReqInfo)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment