Class P12ServiceAccountConfig
- java.lang.Object
-
- com.google.jenkins.plugins.credentials.oauth.ServiceAccountConfig
-
- com.google.jenkins.plugins.credentials.oauth.P12ServiceAccountConfig
-
- All Implemented Interfaces:
Describable<ServiceAccountConfig>
,Serializable
public class P12ServiceAccountConfig extends ServiceAccountConfig
Provides authentication mechanism for a service account by setting a service account email address and P12 private key file.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
P12ServiceAccountConfig.DescriptorImpl
Descriptor for P12 service account authentication.-
Nested classes/interfaces inherited from class com.google.jenkins.plugins.credentials.oauth.ServiceAccountConfig
ServiceAccountConfig.Descriptor
-
-
Constructor Summary
Constructors Constructor Description P12ServiceAccountConfig(String emailAddress)
P12ServiceAccountConfig(String emailAddress, org.apache.commons.fileupload.FileItem p12KeyFileUpload, String prevP12KeyFile)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description String
getAccountId()
P12ServiceAccountConfig.DescriptorImpl
getDescriptor()
String
getEmailAddress()
String
getFilename()
String
getP12KeyFile()
Deprecated.org.apache.commons.fileupload.FileItem
getP12KeyFileUpload()
Deprecated.PrivateKey
getPrivateKey()
com.cloudbees.plugins.credentials.SecretBytes
getSecretP12Key()
Do not use, required for UI.void
setFilename(String filename)
void
setP12KeyFileUpload(org.apache.commons.fileupload.FileItem p12KeyFile)
Deprecated.void
setSecretP12Key(com.cloudbees.plugins.credentials.SecretBytes secretP12Key)
-
Methods inherited from class com.google.jenkins.plugins.credentials.oauth.ServiceAccountConfig
getSecretBytesFromFile
-
-
-
-
Constructor Detail
-
P12ServiceAccountConfig
@DataBoundConstructor public P12ServiceAccountConfig(String emailAddress)
- Parameters:
emailAddress
- The service account email address.- Since:
- 0.8
-
P12ServiceAccountConfig
@Deprecated public P12ServiceAccountConfig(String emailAddress, org.apache.commons.fileupload.FileItem p12KeyFileUpload, String prevP12KeyFile)
Deprecated.For being able to load credentials created with versions < 0.8 and backwards compatibility with external callers.- Parameters:
emailAddress
- The service account email address.p12KeyFileUpload
- The uploaded p12 key file.prevP12KeyFile
- The path of the previous p12 key file.- Since:
- 0.3
-
-
Method Detail
-
setP12KeyFileUpload
@Deprecated @DataBoundSetter public void setP12KeyFileUpload(org.apache.commons.fileupload.FileItem p12KeyFile)
Deprecated.- Parameters:
p12KeyFile
- The uploaded p12 key file.
-
setFilename
@DataBoundSetter public void setFilename(String filename)
- Parameters:
filename
- The previous p12 key file name.
-
setSecretP12Key
@DataBoundSetter public void setSecretP12Key(com.cloudbees.plugins.credentials.SecretBytes secretP12Key)
- Parameters:
secretP12Key
- The previous p12 key file content.
-
getDescriptor
public P12ServiceAccountConfig.DescriptorImpl getDescriptor()
-
getEmailAddress
public String getEmailAddress()
-
getFilename
@CheckForNull public String getFilename()
- Returns:
- Original uploaded file name.
- Since:
- 0.7
-
getSecretP12Key
@Restricted(org.kohsuke.accmod.restrictions.DoNotUse.class) @CheckForNull public com.cloudbees.plugins.credentials.SecretBytes getSecretP12Key()
Do not use, required for UI.- Returns:
- The secret p12 key.
-
getP12KeyFile
@Deprecated public String getP12KeyFile()
Deprecated.- Returns:
- The path of the previous p12 key file.
-
getP12KeyFileUpload
@Deprecated @Restricted(org.kohsuke.accmod.restrictions.DoNotUse.class) public org.apache.commons.fileupload.FileItem getP12KeyFileUpload()
Deprecated.Do not use, required for UI.- Returns:
- The uploaded p12 key file.
-
getAccountId
public String getAccountId()
- Specified by:
getAccountId
in classServiceAccountConfig
-
getPrivateKey
public PrivateKey getPrivateKey()
- Specified by:
getPrivateKey
in classServiceAccountConfig
-
-