Class OriginAppCredentials

java.lang.Object
com.cloudbees.plugins.credentials.BaseCredentials
com.cloudbees.plugins.credentials.impl.BaseStandardCredentials
io.jenkins.plugins.cursor_origin_branch_source.OriginAppCredentials
All Implemented Interfaces:
com.cloudbees.plugins.credentials.common.IdCredentials, com.cloudbees.plugins.credentials.common.PasswordCredentials, com.cloudbees.plugins.credentials.common.StandardCredentials, com.cloudbees.plugins.credentials.common.StandardUsernameCredentials, com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials, com.cloudbees.plugins.credentials.common.UsernameCredentials, com.cloudbees.plugins.credentials.common.UsernamePasswordCredentials, com.cloudbees.plugins.credentials.Credentials, ExtensionPoint, Describable<com.cloudbees.plugins.credentials.Credentials>, Serializable

public class OriginAppCredentials extends com.cloudbees.plugins.credentials.impl.BaseStandardCredentials implements com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static interface 
     
    static final class 
     
    static class 
    Prevents UsernamePasswordCredentialsSnapshotTaker from freezing the ephemeral installation token into a static credential, which would break subsequent token refreshes.
    static final record 
     
    static final class 
     

    Nested classes/interfaces inherited from class com.cloudbees.plugins.credentials.impl.BaseStandardCredentials

    com.cloudbees.plugins.credentials.impl.BaseStandardCredentials.BaseStandardCredentialsDescriptor

    Nested classes/interfaces inherited from interface hudson.ExtensionPoint

    ExtensionPoint.LegacyInstancesAreScopedToHudson

    Nested classes/interfaces inherited from interface com.cloudbees.plugins.credentials.common.IdCredentials

    com.cloudbees.plugins.credentials.common.IdCredentials.Helpers

    Nested classes/interfaces inherited from interface com.cloudbees.plugins.credentials.common.StandardCredentials

    com.cloudbees.plugins.credentials.common.StandardCredentials.NameProvider

    Nested classes/interfaces inherited from interface com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials

    com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials.NameProvider
  • Constructor Summary

    Constructors
    Constructor
    Description
    OriginAppCredentials(com.cloudbees.plugins.credentials.CredentialsScope scope, String id, String description, String appId, String installationId, Secret privateKey)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    api()
    Creates an API client authenticated as this app installation.
    forRun(Run<?,?> build)
     
     
     
     
     
     
    boolean
     
    void
    setUnrestricted(boolean unrestricted)
     

    Methods inherited from class com.cloudbees.plugins.credentials.impl.BaseStandardCredentials

    equals, getDescription, getId, hashCode

    Methods inherited from class com.cloudbees.plugins.credentials.BaseCredentials

    getDescriptor, getScope

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.cloudbees.plugins.credentials.Credentials

    getDescriptor, getScope

    Methods inherited from interface com.cloudbees.plugins.credentials.common.IdCredentials

    getId

    Methods inherited from interface com.cloudbees.plugins.credentials.common.StandardCredentials

    getDescription

    Methods inherited from interface com.cloudbees.plugins.credentials.common.UsernameCredentials

    isUsernameSecret
  • Constructor Details

    • OriginAppCredentials

      @DataBoundConstructor public OriginAppCredentials(com.cloudbees.plugins.credentials.CredentialsScope scope, String id, String description, String appId, String installationId, Secret privateKey)
  • Method Details

    • getAppId

      public String getAppId()
    • getInstallationId

      public String getInstallationId()
    • getPrivateKey

      public Secret getPrivateKey()
    • setUnrestricted

      @DataBoundSetter public void setUnrestricted(boolean unrestricted)
    • isUnrestricted

      public boolean isUnrestricted()
    • getUsername

      @NonNull public String getUsername()
      Specified by:
      getUsername in interface com.cloudbees.plugins.credentials.common.UsernameCredentials
    • getPassword

      @NonNull public Secret getPassword()
      Specified by:
      getPassword in interface com.cloudbees.plugins.credentials.common.PasswordCredentials
    • forRun

      public OriginAppCredentials forRun(Run<?,?> build)
      Specified by:
      forRun in interface com.cloudbees.plugins.credentials.Credentials
    • api

      public OriginServiceApi api()
      Creates an API client authenticated as this app installation.

      Each call mints a fresh installation access token, so callers should reuse the returned client for the duration of a logical operation rather than calling this per request.