Skip to content

Commit de2860b

Browse files
committed
Maybe it works to call the Secret ctor on the controller side (the serial form is plaintext)
1 parent 7f23a79 commit de2860b

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

Jenkinsfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
buildPlugin(configurations: [
22
[ platform: "linux", jdk: "8"],
33
[ platform: "windows", jdk: "8"],
4-
[ platform: "linux", jdk: "11"]
4+
[ platform: "linux", jdk: "11", jenkins: "2.176.4", javaLevel: "8" ]
55
])

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<changelist>-SNAPSHOT</changelist>
2626
<hpi.compatibleSinceVersion>2.2.0</hpi.compatibleSinceVersion>
2727
<java.level>8</java.level>
28-
<jenkins.version>2.235.1</jenkins.version>
28+
<jenkins.version>2.176.4</jenkins.version>
2929
<useBeta>true</useBeta>
3030
<jjwt.version>0.11.2</jjwt.version>
3131
</properties>
@@ -114,7 +114,7 @@
114114
<dependencies>
115115
<dependency>
116116
<groupId>io.jenkins.tools.bom</groupId>
117-
<artifactId>bom-2.235.x</artifactId>
117+
<artifactId>bom-2.176.x</artifactId>
118118
<version>11</version>
119119
<scope>import</scope>
120120
<type>pom</type>

src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubAppCredentials.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -218,13 +218,13 @@ public String getUsername() {
218218
@Override
219219
public Secret getPassword() {
220220
try {
221-
return Secret.fromString(ch.call(new GetPassword(data)));
221+
return ch.call(new GetPassword(data));
222222
} catch (IOException | InterruptedException x) {
223223
throw new RuntimeException(x);
224224
}
225225
}
226226

227-
private static final class GetPassword extends SlaveToMasterCallable<String, RuntimeException> {
227+
private static final class GetPassword extends SlaveToMasterCallable<Secret, RuntimeException> {
228228

229229
private final String data;
230230

@@ -233,9 +233,9 @@ private static final class GetPassword extends SlaveToMasterCallable<String, Run
233233
}
234234

235235
@Override
236-
public String call() throws RuntimeException {
236+
public Secret call() throws RuntimeException {
237237
String[] fields = Secret.fromString(data).getPlainText().split(SEP);
238-
return generateAppInstallationToken(fields[0], fields[1], fields[2], fields[3]);
238+
return Secret.fromString(generateAppInstallationToken(fields[0], fields[1], fields[2], fields[3]));
239239
}
240240

241241
}

0 commit comments

Comments
 (0)