Add Spotiverse Spotify credential custody

This commit is contained in:
Meta Vens 2026-06-02 16:25:38 +01:00
commit e2a2f20693
15 changed files with 373 additions and 12 deletions

View file

@ -0,0 +1,37 @@
# Spotiverse App Profile
Spotiverse consumes Heimdall as a managed Spotify credential authority.
## Boundary
- Heimdall owns Spotify OAuth, linked identity custody, refresh-token custody,
and managed access-token projection.
- Spotiverse owns Spotify playback polling, queue command execution, command
receipts, and its CultMesh/Eve provider surface.
- Odin, Eve, VoidBot Faces, and renderers consume the surface and command
boundary; they do not receive Spotify tokens.
## Providers
- identity providers: `spotify`
- entitlement sources: none
- managed connection providers: `spotify`
## Capabilities
- `spotify_player_read`: shared capability after a linked Spotify identity.
- `spotify_queue_add`: shared capability after a linked Spotify identity;
Spotiverse still owns URI validation and command receipts.
## Local Configuration
Heimdall needs:
```text
GC_ACCESS_PROVIDER_SPOTIFY_CLIENT_ID=...
GC_ACCESS_PROVIDER_SPOTIFY_CLIENT_SECRET=...
GC_ACCESS_APP_SPOTIVERSE_SHARED_SECRET=...
```
Spotiverse needs only the Heimdall base URL, matching app secret, and local
callback/return URLs.

View file

@ -475,6 +475,8 @@ Suggested generic env surface:
- `GC_ACCESS_PROVIDER_TWITCH_CLIENT_SECRET=...`
- `GC_ACCESS_PROVIDER_YOUTUBE_CLIENT_ID=...`
- `GC_ACCESS_PROVIDER_YOUTUBE_CLIENT_SECRET=...`
- `GC_ACCESS_PROVIDER_SPOTIFY_CLIENT_ID=...`
- `GC_ACCESS_PROVIDER_SPOTIFY_CLIENT_SECRET=...`
- `GC_ACCESS_ENTITLEMENT_CACHE_TTL_SECONDS=900`
- `GC_ACCESS_PROVIDER_FAILURE_GRACE_SECONDS=3600`

View file

@ -118,6 +118,7 @@ Supported providers in the skeleton:
- `github`
- `twitch`
- `youtube`
- `spotify`
Request body:
@ -445,8 +446,8 @@ Request body:
```json
{
"accountId": "acct_streampixels_001",
"provider": "youtube"
"accountId": "acct_spotiverse_001",
"provider": "spotify"
}
```
@ -454,12 +455,12 @@ Response:
```json
{
"accountId": "acct_streampixels_001",
"provider": "youtube",
"providerUserId": "channel-123",
"accountId": "acct_spotiverse_001",
"provider": "spotify",
"providerUserId": "spotify-user-123",
"accessToken": "<provider-access-token>",
"tokenExpiresAt": "2026-04-26T13:00:00.000Z",
"scopes": ["openid", "profile", "email"]
"tokenExpiresAt": "2026-06-02T13:00:00.000Z",
"scopes": ["user-read-playback-state", "user-modify-playback-state"]
}
```