001/* 002 * Copyright 2026 Revetware LLC. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016 017package com.revetsec.jose; 018 019import javax.annotation.concurrent.ThreadSafe; 020 021/** 022 * Where a validator gets the public keys that verify token signatures: a fixed key set 023 * ({@link StaticJwksSource}) or one fetched from a URI and kept up to date ({@link RemoteJwksSource}). 024 * <p> 025 * A source holds no issuer. Share one only among validators that expect the same issuer, because every key in it is 026 * trusted for any token those validators check. 027 * <p> 028 * The list of permitted implementations is not switch-stable: a later release may add one, so a {@code switch} over 029 * a source needs a default branch. 030 * 031 * @author <a href="https://www.revetkn.com">Mark Allen</a> 032 * @since 1.0.0 033 */ 034@ThreadSafe 035public sealed interface JwksSource permits StaticJwksSource, RemoteJwksSource { 036}