8000 Make `ThemeManagerFactory` into a proper SPI so that it can be accessed/overridden · Issue #38433 · keycloak/keycloak · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Make ThemeManagerFactory into a proper SPI so that it can be accessed/overridden #38433
Closed
@xgp

Description

@xgp

Description

Currently, DefaultThemeManagerFactory is an internal class and can't be accessed/overridden by extensions.

Discussion

No response

Motivation

It is desirable to allow other extensions to override and/or use the functionality of this class.

For example, the clearCache method in DefaultThemeManagerFactory is not exposed via any public SPI, so you cannot directly access it in a standard Keycloak extension. An author of a ThemeProvider or ThemeSelector may want to access this as part of building a dynamic Theme that changes at runtime.

Details

To implement:

  • create a ThemeManagerSpi class
  • expose the current DefaultThemeManagerFactory methods as a ThemeManagerFactory interface
  • update the code that uses the DefaultThemeManagerFactory (looks like only the DefaultKeycloakSessionFactory and DefaultThemeManager) to load the implementation using session.getProvider...

I'll submit a PR in a few days.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0