1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-05 10:07:22 +00:00
This commit is contained in:
techknowlogick
2021-02-28 18:08:33 -05:00
committed by GitHub
parent 030646eea4
commit 47f6a4ec3f
947 changed files with 26119 additions and 7062 deletions

View File

@ -58,13 +58,16 @@ func makeURLAbs(url *url.URL, request *http.Request) {
// IsAuthorized takes an *http.Request and returns a pointer to a string containing the consumer key,
// or nil if not authorized
func (provider *Provider) IsAuthorized(request *http.Request) (*string, error) {
var userParams = map[string]string{}
var err error
var userParams map[string]string
// start with the body/query params
userParams, err = parseBody(request)
if err != nil {
if params_temp, err := parseBody(request); err != nil {
return nil, err
} else {
for k, v := range params_temp {
userParams[k] = v[0]
}
}
// if the oauth params are in the Authorization header, grab them, and