001package com.nimbusds.jose;
002
003
004import java.util.Set;
005
006
007/**
008 * Javascript Object Signing and Encryption (JOSE) header filter. Specifies the
009 * names of the accepted header parameters.
010 *
011 * @author Vladimir Dzhuvinov
012 * @version $version$ (2013-03-22)
013 */
014public interface HeaderFilter {
015
016
017        /**
018         * Gets the names of the accepted header parameters.
019         *
020         * @return The accepted header parameters, as a read-only set. Must 
021         *         contain at least the {@code alg} parameter for JWS headers 
022         *         or the {@code alg} and {@code enc} parameters for JWE 
023         *         headers.
024         */
025        public Set<String> getAcceptedParameters();
026
027
028        /**
029         * Sets the names of the accepted header parameters.
030         *
031         * @param acceptedParams The accepted header parameters. Must contain 
032         *                       at least the {@code alg} parameter for JWS 
033         *                       headers or the {@code alg} and {@code enc} 
034         *                       parameters for JWE headers. Must not be 
035         *                       {@code null}.
036         */
037        public void setAcceptedParameters(final Set<String> acceptedParams);
038}