Class JWKSetSourceWithHealthStatusReporting<C extends SecurityContext>

  • All Implemented Interfaces:
    JWKSetSource<C>, java.io.Closeable, java.lang.AutoCloseable

    @ThreadSafe
    public class JWKSetSourceWithHealthStatusReporting<C extends SecurityContext>
    extends JWKSetSourceWrapper<C>
    Decorates a JWKSetSource with health status reporting.
    Version:
    2022-11-22
    Author:
    Thomas Rørvik Skjølberg, Vladimir Dzhuvinov
    • Constructor Detail

      • JWKSetSourceWithHealthStatusReporting

        public JWKSetSourceWithHealthStatusReporting​(JWKSetSource<C> source,
                                                     HealthReportListener<JWKSetSourceWithHealthStatusReporting<C>,​C> healthReportListener)
        Creates a new JWK set source with health status reporting to the specified listener.
        Parameters:
        source - The JWK set source to wrap. Must not be null.
        healthReportListener - The health report listener. Must not be null.
    • Method Detail

      • getJWKSet

        public JWKSet getJWKSet​(JWKSetCacheRefreshEvaluator refreshEvaluator,
                                long currentTime,
                                C context)
                         throws KeySourceException
        Description copied from interface: JWKSetSource
        Gets the JWK set.
        Parameters:
        refreshEvaluator - Controls whether refresh of the JWK set cache (if utilised by the source) is required.
        currentTime - The current time, in milliseconds since the Unix epoch.
        context - Optional context, null if not required.
        Returns:
        The JWK set.
        Throws:
        KeySourceException - If JWK set retrieval failed.