summaryrefslogtreecommitdiff
path: root/internal/processing
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2022-10-08 13:49:56 +0200
committerLibravatar GitHub <noreply@github.com>2022-10-08 13:49:56 +0200
commit3bb45b71796cc4e7010a6ba89c27760877084d71 (patch)
tree1cdd737963482daab1c99636dc8f25205d628f09 /internal/processing
parent[bugfix] Fix new domain block date (#893) (diff)
downloadgotosocial-3bb45b71796cc4e7010a6ba89c27760877084d71.tar.xz
[feature] `oob` oauth token support (#889)
* move helpful advice into oauth server * rewrite HandleAuthorizeRequest to allow oob
Diffstat (limited to 'internal/processing')
-rw-r--r--internal/processing/oauth.go2
-rw-r--r--internal/processing/processor.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/internal/processing/oauth.go b/internal/processing/oauth.go
index 9c974f76e..0a36bc336 100644
--- a/internal/processing/oauth.go
+++ b/internal/processing/oauth.go
@@ -24,7 +24,7 @@ import (
"github.com/superseriousbusiness/gotosocial/internal/gtserror"
)
-func (p *processor) OAuthHandleAuthorizeRequest(w http.ResponseWriter, r *http.Request) error {
+func (p *processor) OAuthHandleAuthorizeRequest(w http.ResponseWriter, r *http.Request) gtserror.WithCode {
// todo: some kind of metrics stuff here
return p.oauthServer.HandleAuthorizeRequest(w, r)
}
diff --git a/internal/processing/processor.go b/internal/processing/processor.go
index 5dd795c18..81ed3c8e5 100644
--- a/internal/processing/processor.go
+++ b/internal/processing/processor.go
@@ -160,7 +160,7 @@ type Processor interface {
NotificationsClear(ctx context.Context, authed *oauth.Auth) gtserror.WithCode
OAuthHandleTokenRequest(r *http.Request) (map[string]interface{}, gtserror.WithCode)
- OAuthHandleAuthorizeRequest(w http.ResponseWriter, r *http.Request) error
+ OAuthHandleAuthorizeRequest(w http.ResponseWriter, r *http.Request) gtserror.WithCode
// SearchGet performs a search with the given params, resolving/dereferencing remotely as desired
SearchGet(ctx context.Context, authed *oauth.Auth, searchQuery *apimodel.SearchQuery) (*apimodel.SearchResult, gtserror.WithCode)