Archived
修正协议处理并解耦可选遥测
This commit is contained in:
@@ -64,9 +64,12 @@ func ParseExchangeRequest(form url.Values) (ExchangeRequest, error) {
|
||||
if len(request.Scopes) == 0 {
|
||||
return ExchangeRequest{}, requestError("invalid_scope", "scope is required")
|
||||
}
|
||||
for _, unsupported := range []string{"resource", "actor_token", "actor_token_type"} {
|
||||
if form.Has(unsupported) {
|
||||
return ExchangeRequest{}, requestError("invalid_request", unsupported+" is not supported")
|
||||
if form.Has("resource") {
|
||||
return ExchangeRequest{}, requestError("invalid_target", "resource target is not supported")
|
||||
}
|
||||
for _, actorParameter := range []string{"actor_token", "actor_token_type"} {
|
||||
if form.Has(actorParameter) {
|
||||
return ExchangeRequest{}, requestError("invalid_request", "actor token is not supported")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user