Refactor limit oauth scopesUnverified
01ad903 parent: fd0b623 modified
internal/server/server.go +17 -1 | @@ -31,7 +31,23 @@ import ( | ||
| 31 | 31 | "pkg.rbrt.fr/glean/static" |
| 32 | 32 | ) |
| 33 | 33 | |
| 34 | -var oauthScopes = []string{"atproto", "transition:generic"} | |
| 34 | +var oauthScopes = []string{ | |
| 35 | + "atproto", | |
| 36 | + "blob:*/*", | |
| 37 | + | |
| 38 | + fmt.Sprintf("repo:%s", atproto.CollectionSubscription), | |
| 39 | + fmt.Sprintf("repo:%s", atproto.CollectionLike), | |
| 40 | + fmt.Sprintf("repo:%s", atproto.CollectionAnnotation), | |
| 41 | + | |
| 42 | + "rpc:at.glean.listSubscriptions?aud=*", | |
| 43 | + "rpc:at.glean.listLikes?aud=*", | |
| 44 | + "rpc:at.glean.getTrending?aud=*", | |
| 45 | + "rpc:at.glean.getRecommendations?aud=*", | |
| 46 | + "rpc:at.glean.listFeedLists?aud=*", | |
| 47 | + "rpc:at.glean.listAnnotations?aud=*", | |
| 48 | + | |
| 49 | + "rpc:app.bsky.actor.getProfile?aud=*", | |
| 50 | +} | |
| 35 | 51 | |
| 36 | 52 | func splitString(s, sep string) []string { |
| 37 | 53 | return strings.Split(s, sep) |
| @@ -31,7 +31,23 @@ import ( | |||
| 31 | "pkg.rbrt.fr/glean/static" | 31 | "pkg.rbrt.fr/glean/static" |
| 32 | ) | 32 | ) |
| 33 | 33 | ||
| 34 | -var oauthScopes = []string{"atproto", "transition:generic"} | 34 | +var oauthScopes = []string{ |
| 35 | + "atproto", | ||
| 36 | + "blob:*/*", | ||
| 37 | + | ||
| 38 | + fmt.Sprintf("repo:%s", atproto.CollectionSubscription), | ||
| 39 | + fmt.Sprintf("repo:%s", atproto.CollectionLike), | ||
| 40 | + fmt.Sprintf("repo:%s", atproto.CollectionAnnotation), | ||
| 41 | + | ||
| 42 | + "rpc:at.glean.listSubscriptions?aud=*", | ||
| 43 | + "rpc:at.glean.listLikes?aud=*", | ||
| 44 | + "rpc:at.glean.getTrending?aud=*", | ||
| 45 | + "rpc:at.glean.getRecommendations?aud=*", | ||
| 46 | + "rpc:at.glean.listFeedLists?aud=*", | ||
| 47 | + "rpc:at.glean.listAnnotations?aud=*", | ||
| 48 | + | ||
| 49 | + "rpc:app.bsky.actor.getProfile?aud=*", | ||
| 50 | +} | ||
| 35 | 51 | ||
| 36 | func splitString(s, sep string) []string { | 52 | func splitString(s, sep string) []string { |
| 37 | return strings.Split(s, sep) | 53 | return strings.Split(s, sep) |