Files
github-api/jacoco/org.kohsuke.github/GHVerification.java.html
2021-06-02 11:09:28 -07:00

83 lines
4.2 KiB
HTML

<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="../jacoco-resources/report.gif" type="image/gif"/><title>GHVerification.java</title><link rel="stylesheet" href="../jacoco-resources/prettify.css" type="text/css"/><script type="text/javascript" src="../jacoco-resources/prettify.js"></script></head><body onload="window['PR_TAB_WIDTH']=4;prettyPrint()"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="../jacoco-sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">GitHub API for Java</a> &gt; <a href="index.source.html" class="el_package">org.kohsuke.github</a> &gt; <span class="el_source">GHVerification.java</span></div><h1>GHVerification.java</h1><pre class="source lang-java linenums">package org.kohsuke.github;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
/**
* The commit/tag can be signed by user. This object holds the verification status. Whether the Commit/Tag is signed or
* not.
*
* @see &lt;a href=&quot;https://developer.github.com/v3/git/tags/#signature-verification-object&quot;&gt;tags signature
* verificatiion&lt;/a&gt;
* @see &lt;a href=&quot;https://developer.github.com/v3/git/commits/#signature-verification-object&quot;&gt;commits signature
* verificatiion&lt;/a&gt;
*
* @author Sourabh Sarvotham Parkala
*/
@SuppressFBWarnings(value = { &quot;UWF_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD&quot;, &quot;UWF_UNWRITTEN_FIELD&quot;, &quot;NP_UNWRITTEN_FIELD&quot; },
justification = &quot;JSON API&quot;)
<span class="fc" id="L18">public class GHVerification {</span>
private String signature, payload;
private boolean verified;
private Reason reason;
/**
* Indicates whether GitHub considers the signature in this commit to be verified.
*
* @return true if the signature is valid else returns false.
*/
public boolean isVerified() {
<span class="fc" id="L29"> return verified;</span>
}
/**
* Gets reason for verification value.
*
* @return return reason of type {@link Reason}, such as &quot;valid&quot; or &quot;unsigned&quot;. The possible values can be found in
* {@link Reason}}
*/
public Reason getReason() {
<span class="fc" id="L39"> return reason;</span>
}
/**
* Gets signature used for the verification.
*
* @return null if not signed else encoded signature.
*/
public String getSignature() {
<span class="fc" id="L48"> return signature;</span>
}
/**
* Gets the payload that was signed.
*
* @return null if not signed else encoded signature.
*/
public String getPayload() {
<span class="fc" id="L57"> return payload;</span>
}
/**
* The possible values for reason in verification object from github.
*
* @see &lt;a href=&quot;https://developer.github.com/v3/repos/commits/#signature-verification-object&quot;&gt;List of possible
* reason values&lt;/a&gt;
* @author Sourabh Sarvotham Parkala
*/
<span class="fc" id="L67"> public enum Reason {</span>
<span class="fc" id="L68"> EXPIRED_KEY,</span>
<span class="fc" id="L69"> NOT_SIGNING_KEY,</span>
<span class="fc" id="L70"> GPGVERIFY_ERROR,</span>
<span class="fc" id="L71"> GPGVERIFY_UNAVAILABLE,</span>
<span class="fc" id="L72"> UNSIGNED,</span>
<span class="fc" id="L73"> UNKNOWN_SIGNATURE_TYPE,</span>
<span class="fc" id="L74"> NO_USER,</span>
<span class="fc" id="L75"> UNVERIFIED_EMAIL,</span>
<span class="fc" id="L76"> BAD_EMAIL,</span>
<span class="fc" id="L77"> UNKNOWN_KEY,</span>
<span class="fc" id="L78"> MALFORMED_SIGNATURE,</span>
<span class="fc" id="L79"> INVALID,</span>
<span class="fc" id="L80"> VALID</span>
}
}
</pre><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.7.202105040129</span></div></body></html>