feat: Add Reddit and Twitch named providers (#294)
Adding auth support for future Reddit and Twitch tools.
This commit is contained in:
parent
f04087b389
commit
ef5b19b4a2
2 changed files with 22 additions and 0 deletions
|
|
@ -96,6 +96,15 @@ class Notion(OAuth2):
|
||||||
super().__init__(id=id, scopes=scopes)
|
super().__init__(id=id, scopes=scopes)
|
||||||
|
|
||||||
|
|
||||||
|
class Reddit(OAuth2):
|
||||||
|
"""Marks a tool as requiring Reddit authorization."""
|
||||||
|
|
||||||
|
provider_id: str = "reddit"
|
||||||
|
|
||||||
|
def __init__(self, *, id: Optional[str] = None, scopes: Optional[list[str]] = None): # noqa: A002
|
||||||
|
super().__init__(id=id, scopes=scopes)
|
||||||
|
|
||||||
|
|
||||||
class Slack(OAuth2):
|
class Slack(OAuth2):
|
||||||
"""Marks a tool as requiring Slack (user token) authorization."""
|
"""Marks a tool as requiring Slack (user token) authorization."""
|
||||||
|
|
||||||
|
|
@ -114,6 +123,15 @@ class Spotify(OAuth2):
|
||||||
super().__init__(id=id, scopes=scopes)
|
super().__init__(id=id, scopes=scopes)
|
||||||
|
|
||||||
|
|
||||||
|
class Twitch(OAuth2):
|
||||||
|
"""Marks a tool as requiring Twitch authorization."""
|
||||||
|
|
||||||
|
provider_id: str = "twitch"
|
||||||
|
|
||||||
|
def __init__(self, *, id: Optional[str] = None, scopes: Optional[list[str]] = None): # noqa: A002
|
||||||
|
super().__init__(id=id, scopes=scopes)
|
||||||
|
|
||||||
|
|
||||||
class X(OAuth2):
|
class X(OAuth2):
|
||||||
"""Marks a tool as requiring X (Twitter) authorization."""
|
"""Marks a tool as requiring X (Twitter) authorization."""
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,9 +7,11 @@ from arcade.core.auth import (
|
||||||
LinkedIn,
|
LinkedIn,
|
||||||
Notion,
|
Notion,
|
||||||
OAuth2,
|
OAuth2,
|
||||||
|
Reddit,
|
||||||
Slack,
|
Slack,
|
||||||
Spotify,
|
Spotify,
|
||||||
ToolAuthorization,
|
ToolAuthorization,
|
||||||
|
Twitch,
|
||||||
X,
|
X,
|
||||||
Zoom,
|
Zoom,
|
||||||
)
|
)
|
||||||
|
|
@ -23,9 +25,11 @@ __all__ = [
|
||||||
"LinkedIn",
|
"LinkedIn",
|
||||||
"Notion",
|
"Notion",
|
||||||
"OAuth2",
|
"OAuth2",
|
||||||
|
"Reddit",
|
||||||
"Slack",
|
"Slack",
|
||||||
"Spotify",
|
"Spotify",
|
||||||
"ToolAuthorization",
|
"ToolAuthorization",
|
||||||
|
"Twitch",
|
||||||
"X",
|
"X",
|
||||||
"Zoom",
|
"Zoom",
|
||||||
]
|
]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue