[WIP] music platform user data scraper
teal-fm
atproto
1package oauth
2
3import (
4 "net/http"
5)
6
7type AuthService interface {
8 // inits the login flow for the service
9 HandleLogin(w http.ResponseWriter, r *http.Request)
10 // handles the callback for the provider. is responsible for inserting
11 // sessions in the db
12 HandleCallback(w http.ResponseWriter, r *http.Request) (int64, error)
13}
14
15// optional but recommended
16type TokenReceiver interface {
17 // stores the access token in the db
18 // if there is a session, will associate the token with the session
19 SetAccessToken(token string, refreshToken string, currentId int64, hasSession bool) (int64, error)
20}