001package com.nimbusds.oauth2.sdk.jose.jwk; 002 003 004import java.util.List; 005 006import com.nimbusds.jose.jwk.JWK; 007import com.nimbusds.jose.jwk.JWKSelector; 008import com.nimbusds.oauth2.sdk.id.Identifier; 009 010 011/** 012 * JSON Web Key (JWK) source. Exposes a method for retrieving selected keys for 013 * a party (OAuth 2.0 server or client). Implementations must be thread-safe. 014 */ 015public interface JWKSource { 016 017 018 /** 019 * Retrieves a list of JWKs matching the specified criteria. 020 * 021 * @param id Identifier of the JWK owner, typically an 022 * Authorisation Server / OpenID Provider issuer ID, 023 * or client ID. Must not be {@code null}. 024 * @param jwkSelector A JWK selector. Must not be {@code null}. 025 * 026 * @return The matching JWKs, empty list if no matches were found or 027 * retrieval failed. 028 */ 029 List<JWK> get(final Identifier id, final JWKSelector jwkSelector); 030}