mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 19:12:25 -05:00
Streaming (#49)
Add new status and notification websocket streaming capabilities
This commit is contained in:
parent
ad2e982edc
commit
aa8a0d0850
21 changed files with 621 additions and 30 deletions
|
|
@ -56,6 +56,7 @@ type Server interface {
|
|||
HandleAuthorizeRequest(w http.ResponseWriter, r *http.Request) error
|
||||
ValidationBearerToken(r *http.Request) (oauth2.TokenInfo, error)
|
||||
GenerateUserAccessToken(ti oauth2.TokenInfo, clientSecret string, userID string) (accessToken oauth2.TokenInfo, err error)
|
||||
LoadAccessToken(ctx context.Context, access string) (accessToken oauth2.TokenInfo, err error)
|
||||
}
|
||||
|
||||
// s fulfils the Server interface using the underlying oauth2 server
|
||||
|
|
@ -171,3 +172,7 @@ func (s *s) GenerateUserAccessToken(ti oauth2.TokenInfo, clientSecret string, us
|
|||
s.log.Tracef("obtained user-level access token: %+v", accessToken)
|
||||
return accessToken, nil
|
||||
}
|
||||
|
||||
func (s *s) LoadAccessToken(ctx context.Context, access string) (accessToken oauth2.TokenInfo, err error) {
|
||||
return s.server.Manager.LoadAccessToken(ctx, access)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue