Deployment and lifecycle management for Nix
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

refactor: remove garden registration token fallback

Garden client no longer falls back to sending the registration token
over the websocket. HTTP registration is now the only path for new
gardens without stored OAuth credentials.

sow-149

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

+4 -8
+4 -8
apps/garden/lib/garden/socket.ex
··· 163 163 } 164 164 when is_binary(token) and is_binary(private_key_pem) -> 165 165 if token_expired?(issued_at, expires_in) do 166 - try_reauthenticate(storage) || registration_token() 166 + try_reauthenticate(storage) 167 167 else 168 168 Logger.debug(msg: "Using stored Boruta access token") 169 169 "boruta:#{token}" ··· 174 174 private_key_pem: private_key_pem 175 175 } 176 176 when is_binary(client_id) and is_binary(private_key_pem) -> 177 - try_reauthenticate(storage) || registration_token() 177 + try_reauthenticate(storage) 178 178 179 179 _ -> 180 - try_http_registration(storage) || registration_token() 180 + try_http_registration(storage) 181 181 end 182 182 end 183 183 ··· 252 252 end 253 253 254 254 {:error, reason} -> 255 - Logger.debug(msg: "HTTP registration failed, falling back", reason: inspect(reason)) 255 + Logger.warning(msg: "HTTP registration failed", reason: inspect(reason)) 256 256 nil 257 257 end 258 258 end 259 259 260 - defp registration_token do 261 - Logger.info(msg: "Using registration token") 262 - Base.encode64(Application.fetch_env!(:garden, :config).access_token) 263 - end 264 260 265 261 defp schedule_reauthentication(socket, %{expires_in: expires_in}) 266 262 when is_integer(expires_in) do