From cd0a1829d4df068ccdc2edc0cca8c8f18a4f6b1e Mon Sep 17 00:00:00 2001 From: tsmethurst Date: Sat, 27 Mar 2021 16:28:24 +0100 Subject: [PATCH] rename oauth server --- internal/oauth/{oauth.go => server.go} | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) rename internal/oauth/{oauth.go => server.go} (99%) diff --git a/internal/oauth/oauth.go b/internal/oauth/server.go similarity index 99% rename from internal/oauth/oauth.go rename to internal/oauth/server.go index 66b5e7961..5fd06c2ea 100644 --- a/internal/oauth/oauth.go +++ b/internal/oauth/server.go @@ -20,17 +20,16 @@ package oauth import ( "context" - "fmt" "net/http" "github.com/gin-gonic/gin" + "github.com/sirupsen/logrus" "github.com/superseriousbusiness/gotosocial/internal/db" "github.com/superseriousbusiness/gotosocial/internal/db/model" "github.com/superseriousbusiness/oauth2/v4" "github.com/superseriousbusiness/oauth2/v4/errors" "github.com/superseriousbusiness/oauth2/v4/manage" "github.com/superseriousbusiness/oauth2/v4/server" - "github.com/sirupsen/logrus" ) const ( @@ -171,7 +170,6 @@ func (s *s) ValidationBearerToken(r *http.Request) (oauth2.TokenInfo, error) { // The ti parameter refers to an existing Application token that was used to make the upstream // request. This token needs to be validated and exist in database in order to create a new token. func (s *s) GenerateUserAccessToken(ti oauth2.TokenInfo, clientSecret string, userID string) (accessToken oauth2.TokenInfo, err error) { - fmt.Printf("GENERATE USER ACCESS TOKEN %+v\n", ti) tgr := &oauth2.TokenGenerateRequest{ ClientID: ti.GetClientID(), ClientSecret: clientSecret,