All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.nimbusds.jose.jwk.source.JWKSource Maven / Gradle / Ivy

Go to download

Java library for Javascript Object Signing and Encryption (JOSE) and JSON Web Tokens (JWT)

There is a newer version: 9.48
Show newest version
package com.nimbusds.jose.jwk.source;


import java.util.List;

import com.nimbusds.jose.KeySourceException;
import com.nimbusds.jose.jwk.JWK;
import com.nimbusds.jose.jwk.JWKSelector;
import com.nimbusds.jose.proc.SecurityContext;


/**
 * JSON Web Key (JWK) source. Exposes a method for retrieving JWKs matching a
 * specified selector. An optional context parameter is available to facilitate
 * passing of additional data between the caller and the underlying JWK source
 * (in both directions). Implementations must be thread-safe.
 *
 * @author Vladimir Dzhuvinov
 * @version 2016-06-21
 */
public interface JWKSource  {
	

	/**
	 * Retrieves a list of JWKs matching the specified selector.
	 *
	 * @param jwkSelector A JWK selector. Must not be {@code null}.
	 * @param context     Optional context, {@code null} if not required.
	 *
	 * @return The matching JWKs, empty list if no matches were found.
	 *
	 * @throws KeySourceException If key sourcing failed.
	 */
	List get(final JWKSelector jwkSelector, final C context)
		throws KeySourceException;
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy