@startuml oauth_preconfigured_providers_before
title Before - OAuth preconfigured providers at server startup

skinparam backgroundColor White
skinparam defaultFontColor Black
skinparam ArrowColor Black
skinparam componentStyle rectangle
skinparam shadowing false

actor "Server Startup" as Startup #EAF3FF
component "src/bin/server.rs\nbuild_auth(...)" as BuildAuth #D5E8D4
component "OAuthPlugin" as OAuthPlugin #F8CECC
component "OAuthProvider::google(...)\n(hardcoded credentials in source)" as GoogleProvider #FFE6CC
component "AthenaAuth Runtime" as Runtime #DAE8FC
component "Schema Debug Payload\nplugins.oauth.providers" as DebugPayload #E1D5E7

Startup --> BuildAuth : initialize auth runtime
BuildAuth --> GoogleProvider : construct provider config
BuildAuth --> OAuthPlugin : add_provider(\"google\", ...)
OAuthPlugin --> Runtime : provider map = { google }
BuildAuth --> DebugPayload : providers = [\"google\"]

note right of OAuthPlugin
Only Google is preconfigured in the server binary.
end note

@enduml
