wip: 继续, client, svc 同步进行
This commit is contained in:
@ -5,6 +5,7 @@ import (
|
||||
"errors"
|
||||
"github.com/google/uuid"
|
||||
"github.com/loveuer/nf"
|
||||
"github.com/loveuer/nf/nft/log"
|
||||
"github.com/loveuer/nf/nft/resp"
|
||||
"gorm.io/gorm"
|
||||
"net/http"
|
||||
@ -27,6 +28,7 @@ func Authorize(c *nf.Ctx) error {
|
||||
ResponseType string `query:"response_type"`
|
||||
RedirectURI string `query:"redirect_uri"`
|
||||
Scope string `query:"scope"`
|
||||
State string `query:"state"`
|
||||
}
|
||||
|
||||
var (
|
||||
@ -39,7 +41,8 @@ func Authorize(c *nf.Ctx) error {
|
||||
)
|
||||
|
||||
if err = c.QueryParser(req); err != nil {
|
||||
return resp.Resp400(c, err)
|
||||
log.Error("[S] query parser err = %s", err.Error())
|
||||
return c.Status(http.StatusBadRequest).SendString("Invalid request")
|
||||
}
|
||||
|
||||
if req.ResponseType != "code" {
|
||||
|
Reference in New Issue
Block a user