go-fed / apcore

Golang ActivityPub Server Framework
GNU Affero General Public License v3.0
104 stars 10 forks source link

side-channel Contexts through the oauth2 library somehow #35

Closed cjslep closed 3 years ago

cjslep commented 3 years ago

The oauth2 server framework does not support passing Context types around its signatures, so need to engineer a way to properly ensure that the request context is propagating through. Since it relies on database calls, it would be nice for OAuth2 requests to properly be cancelled when incoming requests are also cancelled. Without doing this, database calls will wastefully complete for cancelled requests.

cjslep commented 3 years ago

Looks like upgrading to oauth2.v4 will fix this issue - the bump of a major version was due to adding context.Context in the API.

cjslep commented 3 years ago

This is obsolete by #37.