Class ImmutableJWKSet<C extends SecurityContext>

java.lang.Object
com.nimbusds.jose.jwk.source.ImmutableJWKSet<C>
All Implemented Interfaces:
JWKSource<C>
Direct Known Subclasses:
ImmutableSecret

@Immutable public class ImmutableJWKSet<C extends SecurityContext> extends Object implements JWKSource<C>
JSON Web Key (JWK) source backed by an immutable JWK set.
Version:
2024-04-20
Author:
Vladimir Dzhuvinov, Thomas Rørvik Skjølberg
  • Constructor Details

    • ImmutableJWKSet

      public ImmutableJWKSet(JWKSet jwkSet)
      Creates a new JWK source backed by an immutable JWK set.
      Parameters:
      jwkSet - The JWK set. Must not be null.
  • Method Details

    • getJWKSet

      public JWKSet getJWKSet()
      Returns the JWK set.
      Returns:
      The JWK set.
    • get

      public List<JWK> get(JWKSelector jwkSelector, C context)
      Retrieves a list of JWKs matching the specified selector. The security context is ignored.
      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.