Commit cf4dfb4
committed
refactor(server): extract the gRPC API into server/apiserver
Move the gRPC management API out of the Server god object into its own package,
split by domain (clients, passwords, connectors, refresh, sessions, identities,
mfa) with the constructor and shared helpers in api.go.
dexAPI held a *Server but used only two things from it: the connector cache (to
invalidate on connector CRUD) and the discovery-document builder. NewAPI now takes
those two narrow dependencies instead, so apiserver no longer depends on the
server package. The server exposes the API through a thin GRPCAPI method.
The bcrypt hash-cost check is shared by the API (on password create) and the local
passwordDB connector (on login), so it moves to a small server/passwords package
that both import, rather than being duplicated or forcing a server -> apiserver
dependency.
Signed-off-by: maksim.nabokikh <max.nabokih@gmail.com>1 parent b949756 commit cf4dfb4
17 files changed
Lines changed: 1329 additions & 1225 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
593 | 593 | | |
594 | 594 | | |
595 | 595 | | |
596 | | - | |
| 596 | + | |
597 | 597 | | |
598 | 598 | | |
599 | 599 | | |
| |||
0 commit comments