Class Credential

java.lang.Object
com.cloudbees.jenkins.Credential

@Deprecated public class Credential extends Object
Deprecated.
since 1.13.0 plugin uses credentials-plugin to manage tokens. All configuration moved to GitHubPluginConfig which can be fetched via GitHubPlugin.configuration(). You can fetch corresponding config with creds by GitHubPluginConfig.findGithubConfig(Predicate) which returns iterable over authorized nonnull GitHubs matched your predicate
Credential to access GitHub. Used only for migration.
Author:
Kohsuke Kawaguchi
See Also:
  • Field Details

    • username

      public final transient String username
      Deprecated.
    • apiUrl

      public final transient String apiUrl
      Deprecated.
    • oauthAccessToken

      public final transient String oauthAccessToken
      Deprecated.
  • Constructor Details

    • Credential

      @DataBoundConstructor public Credential(String username, String apiUrl, String oauthAccessToken)
      Deprecated.
  • Method Details

    • getUsername

      public String getUsername()
      Deprecated.
    • getApiUrl

      public String getApiUrl()
      Deprecated.
    • getOauthAccessToken

      public String getOauthAccessToken()
      Deprecated.
    • login

      @CheckForNull @Deprecated public org.kohsuke.github.GitHub login() throws IOException
      Deprecated.
      see class javadoc. Now any instance return same GH. Please use new api to fetch another
      Returns:
      authorized first GitHub from global config or null if no any
      Throws:
      IOException - never thrown, but in signature for backward compatibility