Class JWKSetBasedJWKSource<C extends SecurityContext>

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

    @ThreadSafe
    public class JWKSetBasedJWKSource<C extends SecurityContext>
    extends java.lang.Object
    implements JWKSource<C>, java.io.Closeable
    JSON Web Key (JWK) set based JWK source.
    Version:
    2022-11-22
    Author:
    Thomas Rørvik Skjølberg, Vladimir Dzhuvinov
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      java.util.List<JWK> get​(JWKSelector jwkSelector, C context)
      Retrieves a list of JWKs matching the specified selector.
      JWKSetSource<C> getJWKSetSource()
      Returns the underlying JWK set source.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JWKSetBasedJWKSource

        public JWKSetBasedJWKSource​(JWKSetSource<C> source)
        Creates a new JWK set based JWK source.
        Parameters:
        source - The JWK set source. Must not be null.
    • Method Detail

      • get

        public java.util.List<JWK> get​(JWKSelector jwkSelector,
                                       C context)
                                throws KeySourceException
        Description copied from interface: JWKSource
        Retrieves a list of JWKs matching the specified selector.
        Specified by:
        get in interface JWKSource<C extends SecurityContext>
        Parameters:
        jwkSelector - A JWK selector. Must not be null.
        context - Optional context, null if not required.
        Returns:
        The matching JWKs, empty list if no matches were found.
        Throws:
        KeySourceException - If key sourcing failed.
      • getJWKSetSource

        public JWKSetSource<C> getJWKSetSource()
        Returns the underlying JWK set source.
        Returns:
        The JWK set source.
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Throws:
        java.io.IOException