hub.sr.ht/hubsrht/oauth.py

11 lines
362 B
Python
Raw Normal View History

2020-03-24 15:26:15 +01:00
from srht.config import cfg
from srht.oauth import AbstractOAuthService, DelegatedScope
from hubsrht.types import User
client_id = cfg("hub.sr.ht", "oauth-client-id")
client_secret = cfg("hub.sr.ht", "oauth-client-secret")
class HubOAuthService(AbstractOAuthService):
def __init__(self):
super().__init__(client_id, client_secret, user_class=User)