MCPcopy
hub / github.com/ory/hydra / KeyManager

Method KeyManager

driver/registry_sql.go:280–291  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

278func (m *RegistrySQL) OAuth2Storage() x.FositeStorer { return m.Persister() }
279
280func (m *RegistrySQL) KeyManager() jwk.Manager {
281 if m.keyManager == nil {
282 softwareKeyManager := &sql.JWKPersister{D: m}
283 if m.Config().HSMEnabled() {
284 hardwareKeyManager := hsm.NewKeyManager(m.HSMContext(), m.Config())
285 m.keyManager = jwk.NewManagerStrategy(hardwareKeyManager, softwareKeyManager)
286 } else {
287 m.keyManager = softwareKeyManager
288 }
289 }
290 return m.keyManager
291}
292
293func (m *RegistrySQL) GrantManager() trust.GrantManager { return m.Persister() }
294

Callers

nothing calls this directly

Calls 5

ConfigMethod · 0.95
HSMContextMethod · 0.95
NewKeyManagerFunction · 0.92
NewManagerStrategyFunction · 0.92
HSMEnabledMethod · 0.80

Tested by

no test coverage detected