001 package com.nimbusds.jose;
002
003
004 import java.util.Set;
005
006
007 /**
008 * JSON Web Signature (JWS) header filter. Specifies accepted JWS algorithms and
009 * header parameters.
010 *
011 * @author Vladimir Dzhuvinov
012 * @version $version$ (2012-10-04)
013 */
014 public interface JWSHeaderFilter extends HeaderFilter {
015
016
017 /**
018 * Gets the names of the accepted JWS algorithms. These correspond to
019 * the {@code alg} JWS header parameter.
020 *
021 * @return The accepted JWS algorithms as a read-only set, empty set if
022 * none.
023 */
024 public Set<JWSAlgorithm> getAcceptedAlgorithms();
025
026
027 /**
028 * Sets the names of the accepted JWS algorithms. These correspond to
029 * the {@code alg} JWS header parameter.
030 *
031 * @param acceptedAlgs The accepted JWS algorithms. Must be a subset of
032 * the supported algorithms and not {@code null}.
033 */
034 public void setAcceptedAlgorithms(Set<JWSAlgorithm> acceptedAlgs);
035 }