Class Verification

  • public class Verification
    extends Object
    $Revision: 1 $
    Bill Burke
    • Field Detail

      • algorithm

        protected String algorithm
      • identifierName

        protected String identifierName
      • identifierValue

        protected String identifierValue
      • staleCheck

        protected boolean staleCheck
      • ignoreExpiration

        protected boolean ignoreExpiration
      • staleSeconds

        protected int staleSeconds
      • staleMinutes

        protected int staleMinutes
      • staleHours

        protected int staleHours
      • staleDays

        protected int staleDays
      • staleMonths

        protected int staleMonths
      • staleYears

        protected int staleYears
      • bodyHashRequired

        protected boolean bodyHashRequired
    • Constructor Detail

      • Verification

        public Verification()
      • Verification

        public Verification​(PublicKey key)
      • Verification

        public Verification​(KeyRepository repository)
    • Method Detail

      • isBodyHashRequired

        public boolean isBodyHashRequired()
      • setBodyHashRequired

        public void setBodyHashRequired​(boolean bodyHashRequired)
      • getIdentifierName

        public String getIdentifierName()
      • setIdentifierName

        public void setIdentifierName​(String identifierName)
      • getIdentifierValue

        public String getIdentifierValue()
      • setIdentifierValue

        public void setIdentifierValue​(String identifierValue)
      • isIgnoreExpiration

        public boolean isIgnoreExpiration()
      • setIgnoreExpiration

        public void setIgnoreExpiration​(boolean ignoreExpiration)
      • isStaleCheck

        public boolean isStaleCheck()
      • setStaleCheck

        public void setStaleCheck​(boolean staleCheck)
      • getRequiredAttributes

        public Map<String,​String> getRequiredAttributes()
      • getAlgorithm

        public String getAlgorithm()
      • setAlgorithm

        public void setAlgorithm​(String algorithm)
      • setKey

        public void setKey​(PublicKey key)
      • setRepository

        public void setRepository​(KeyRepository repository)
      • getStaleSeconds

        public int getStaleSeconds()
      • setStaleSeconds

        public void setStaleSeconds​(int staleSeconds)
      • getStaleMinutes

        public int getStaleMinutes()
      • setStaleMinutes

        public void setStaleMinutes​(int staleMinutes)
      • getStaleHours

        public int getStaleHours()
      • setStaleHours

        public void setStaleHours​(int staleHours)
      • getStaleDays

        public int getStaleDays()
      • setStaleDays

        public void setStaleDays​(int staleDays)
      • getStaleMonths

        public int getStaleMonths()
      • setStaleMonths

        public void setStaleMonths​(int staleMonths)
      • getStaleYears

        public int getStaleYears()
      • setStaleYears

        public void setStaleYears​(int staleYears)
      • verify

        public<String,​String> verify​(DKIMSignature signature,
                                                                             Map headers,
                                                                             byte[] body,
                                                                             PublicKey publicKey)
                                                                      throws SignatureException
        Headers can be a Map<String, Object> or a Map<String, List<Object>>. This gives some compatibility with JAX-RS's MultivaluedMap. If a map of lists, every value of each header duplicate will be added.
        signature - signature
        headers - headers map
        body - body
        publicKey - public key
        map of validated headers and their values
        SignatureException - if verification fails