Skip to content

Commit 99a7848

Browse files
feat(auth): add broadcast.read and broadcast.write OAuth2 scopes (#82)
Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent bfb0f36 commit 99a7848

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

auth/auth.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -679,6 +679,7 @@ func getOAuth2Scopes() []string {
679679
"like.read",
680680
"users.email",
681681
"dm.read",
682+
"broadcast.read",
682683
}
683684

684685
writeScopes := []string{
@@ -692,6 +693,7 @@ func getOAuth2Scopes() []string {
692693
"list.write",
693694
"media.write",
694695
"dm.write",
696+
"broadcast.write",
695697
}
696698

697699
otherScopes := []string{

auth/auth_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,8 @@ func TestGetOAuth2Scopes(t *testing.T) {
156156
// Check for some common scopes
157157
assert.Contains(t, scopes, "tweet.read", "Expected 'tweet.read' scope")
158158
assert.Contains(t, scopes, "users.read", "Expected 'users.read' scope")
159+
assert.Contains(t, scopes, "broadcast.read", "Expected 'broadcast.read' scope")
160+
assert.Contains(t, scopes, "broadcast.write", "Expected 'broadcast.write' scope")
159161
}
160162

161163
func TestCredentialResolutionPriority(t *testing.T) {

0 commit comments

Comments
 (0)