Skip to content

Commit 6b55da6

Browse files
committed
Update server.go
1 parent 3e4deeb commit 6b55da6

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

server.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,16 +53,16 @@ func (srv *Server) Init() {
5353
// HandleAuthorize 处理Authorize
5454
func (srv *Server) HandleAuthorize(w http.ResponseWriter, r *http.Request) {
5555
// 判断参数
56-
responseType := r.Form.Get(ResponseTypeKey)
57-
clientID := r.Form.Get(ClientIdKey)
58-
redirectURIStr := r.Form.Get(RedirectUriKey)
56+
responseType := r.FormValue(ResponseTypeKey)
57+
clientID := r.FormValue(ClientIdKey)
58+
redirectURIStr := r.FormValue(RedirectUriKey)
5959
redirectURI, err := url.Parse(redirectURIStr)
6060
if err != nil {
6161
WriterError(w, ErrInvalidRequest)
6262
return
6363
}
64-
scope := r.Form.Get(ScopeKey)
65-
state := r.Form.Get(StateKey)
64+
scope := r.FormValue(ScopeKey)
65+
state := r.FormValue(StateKey)
6666
if responseType == "" || clientID == "" {
6767
RedirectError(w, r, redirectURI, ErrInvalidRequest)
6868
return

0 commit comments

Comments
 (0)