Skip to content

Commit ac75e98

Browse files
authored
Merge pull request #6 from szamfirov/fix-client-id
Fix for the Okta Client ID
2 parents 25887bf + 0ede0d2 commit ac75e98

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ apply plugin: 'java'
1818

1919
apply from: 'plugin-common.gradle'
2020

21-
project.ext.pluginVersion = '1.0.0'
21+
project.ext.pluginVersion = '1.1.0'
2222
project.ext.fullVersion = project.distVersion ? "${project.pluginVersion}-${project.distVersion}" : project.pluginVersion
2323

2424
version = project.fullVersion
@@ -30,8 +30,8 @@ project.ext.pluginDesc = [
3030
goCdVersion: '17.5.0',
3131
name : 'Okta oauth authorization plugin',
3232
description: 'Okta oauth authorization plugin for GoCD',
33-
vendorName : 'GoCD Contributors',
34-
vendorUrl : 'https://github.com/gocd-contrib/okta-oauth-authorization-plugin'
33+
vendorName : 'szamfirov',
34+
vendorUrl : 'https://github.com/szamfirov/okta-oauth-authorization-plugin'
3535
]
3636

3737
repositories {
@@ -44,7 +44,7 @@ dependencies {
4444
compile group: 'com.google.code.gson', name: 'gson', version: '2.8.1'
4545
compile group: 'com.squareup.okhttp3', name: 'okhttp', version: '3.8.1'
4646

47-
testCompile group: 'cd.go.plugin', name: 'go-plugin-api', version: '17.4.0'
47+
testCompile group: 'cd.go.plugin', name: 'go-plugin-api', version: '17.5.0'
4848
testCompile group: 'junit', name: 'junit', version: '4.12'
4949
testCompile group: 'org.mockito', name: 'mockito-core', version: '2.2.28'
5050
testCompile group: 'org.hamcrest', name: 'hamcrest-library', version: '1.3'

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.0-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip

src/main/java/cd/go/authorization/okta/OktaApiClient.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
import cd.go.authorization.okta.models.OktaConfiguration;
2020
import cd.go.authorization.okta.models.TokenInfo;
21-
import cd.go.authorization.okta.utils.Util;
2221
import okhttp3.*;
2322

2423
import java.io.IOException;
@@ -27,6 +26,7 @@
2726
import java.util.concurrent.TimeUnit;
2827

2928
import static cd.go.authorization.okta.OktaPlugin.LOG;
29+
import static cd.go.authorization.okta.utils.Util.isBlank;
3030
import static cd.go.authorization.okta.utils.Util.isNotBlank;
3131
import static java.text.MessageFormat.format;
3232

@@ -72,7 +72,7 @@ public String authorizationServerUrl(String callbackUrl) throws Exception {
7272

7373
public TokenInfo fetchAccessToken(Map<String, String> params) throws Exception {
7474
final String code = params.get("code");
75-
if (Util.isBlank(code)) {
75+
if (isBlank(code)) {
7676
throw new RuntimeException("[OktaApiClient] Authorization code must not be null.");
7777
}
7878

src/main/java/cd/go/authorization/okta/models/OktaConfiguration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public class OktaConfiguration implements Validatable {
3737

3838
@Expose
3939
@SerializedName("ClientId")
40-
@ProfileField(key = "ClientId", required = true, secure = true)
40+
@ProfileField(key = "ClientId", required = true, secure = false)
4141
private String clientId;
4242

4343
@Expose

src/main/resources/auth-config.template.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@
105105
</span>
106106
</div>
107107
</label>
108-
<input ng-class="{'is-invalid-input': GOINPUTNAME[ClientId].$error.server}" type="password" ng-model="ClientId" ng-required="true"/>
108+
<input ng-class="{'is-invalid-input': GOINPUTNAME[ClientId].$error.server}" type="text" ng-model="ClientId" ng-required="true"/>
109109
<span class="form_error form-error" ng-class="{'is-visible': GOINPUTNAME[ClientId].$error.server}" ng-show="GOINPUTNAME[ClientId].$error.server">{{GOINPUTNAME[ClientId].$error.server}}</span>
110110
</div>
111111

src/test/java/cd/go/authorization/okta/executors/GetAuthConfigMetadataRequestExecutorTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public void assertJsonStructure() throws Exception {
5555
" \"key\": \"ClientId\",\n" +
5656
" \"metadata\": {\n" +
5757
" \"required\": true,\n" +
58-
" \"secure\": true\n" +
58+
" \"secure\": false\n" +
5959
" }\n" +
6060
" },\n" +
6161
" {\n" +

0 commit comments

Comments
 (0)