aboutsummaryrefslogtreecommitdiff
path: root/id/ConfigWebTool
diff options
context:
space:
mode:
authorThomas Lenz <tlenz@iaik.tugraz.at>2014-01-17 11:56:10 +0100
committerThomas Lenz <tlenz@iaik.tugraz.at>2014-01-17 11:56:10 +0100
commit8b4b3a97cdbdfc4158781982f6e9fc2900871198 (patch)
treeea924998ca61ef36a2fafb888b6477af966df8b1 /id/ConfigWebTool
parentd7404bc44ae84df98031a87052ff2d71ac960bd1 (diff)
downloadmoa-id-spss-8b4b3a97cdbdfc4158781982f6e9fc2900871198.tar.gz
moa-id-spss-8b4b3a97cdbdfc4158781982f6e9fc2900871198.tar.bz2
moa-id-spss-8b4b3a97cdbdfc4158781982f6e9fc2900871198.zip
Exthex Version 0.2
Diffstat (limited to 'id/ConfigWebTool')
-rw-r--r--id/ConfigWebTool/pom.xml7
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/Constants.java3
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OAOAuth20Config.java27
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditOAAction.java21
4 files changed, 24 insertions, 34 deletions
diff --git a/id/ConfigWebTool/pom.xml b/id/ConfigWebTool/pom.xml
index 16eb9bc4f..dd56a6151 100644
--- a/id/ConfigWebTool/pom.xml
+++ b/id/ConfigWebTool/pom.xml
@@ -2,13 +2,13 @@
<parent>
<groupId>MOA</groupId>
<artifactId>id</artifactId>
- <version>1.9.97-SNAPSHOT</version>
+ <version>1.9.96-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>MOA.id</groupId>
<artifactId>ConfigurationInterface</artifactId>
- <version>0.9.6</version>
+ <version>0.9.5</version>
<packaging>war</packaging>
<name>MOA-ID 2.0 Configuration Tool</name>
<description>Web based Configuration Tool for MOA-ID 2.x</description>
@@ -34,11 +34,12 @@
<dependency>
<groupId>MOA.id.server</groupId>
<artifactId>moa-id-commons</artifactId>
- <version>1.9.97-SNAPSHOT</version>
+ <version>1.9.96-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>MOA.id.server</groupId>
<artifactId>moa-id-lib</artifactId>
+ <version>1.9.96-SNAPSHOT</version>
</dependency>
<dependency>
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/Constants.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/Constants.java
index 7f3a2129a..536cc0522 100644
--- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/Constants.java
+++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/Constants.java
@@ -48,11 +48,8 @@ public class Constants {
public static final String PUBLICSERVICE_URL_POSTFIX = ".gv.at";
public static final String IDENIFICATIONTYPE_FN = "FN";
- public static final String IDENIFICATIONTYPE_FN_TYPE = "Firmenbuchnummer";
public static final String IDENIFICATIONTYPE_ERSB = "ERSB";
- public static final String IDENIFICATIONTYPE_ERSB_TYPE = "ERJPZahl";
public static final String IDENIFICATIONTYPE_ZVR = "ZVR";
- public static final String IDENIFICATIONTYPE_ZVR_TYPE = "Vereinsnummer";
public static final String IDENIFICATIONTYPE_BASEID = "urn:publicid:gv.at:baseid+";
public static final String IDENIFICATIONTYPE_BASEID_FN = IDENIFICATIONTYPE_BASEID + "X" + IDENIFICATIONTYPE_FN;
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OAOAuth20Config.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OAOAuth20Config.java
index 3d2e35ec5..63aa1a1cb 100644
--- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OAOAuth20Config.java
+++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OAOAuth20Config.java
@@ -29,22 +29,27 @@ public class OAOAuth20Config {
AuthComponentOA authdata = dbOAConfig.getAuthComponentOA();
if (authdata != null) {
- OAOAUTH20 config = authdata.getOAOAUTH20();
// set client id to public url prefix
this.clientId = dbOAConfig.getPublicURLPrefix();
- // validate secret
- if (config != null && StringUtils.isNotEmpty(config.getOAuthClientSecret())) {
- this.clientSecret = config.getOAuthClientSecret();
- } else {
- this.generateClientSecret();
- }
+ OAOAUTH20 config = authdata.getOAOAUTH20();
- // validate redirectUri
- if (config != null && StringUtils.isNotEmpty(config.getOAuthRedirectUri()) && OAuth20Util.isUrl(config.getOAuthRedirectUri())) {
- this.redirectUri = config.getOAuthRedirectUri();
+ if (config != null) {
+ // validate secret
+ if (StringUtils.isNotEmpty(config.getOAuthClientSecret())) {
+ this.clientSecret = config.getOAuthClientSecret();
+ } else {
+ this.generateClientSecret();
+ }
+
+ // validate redirectUri
+ if (StringUtils.isNotEmpty(config.getOAuthRedirectUri()) && OAuth20Util.isUrl(config.getOAuthRedirectUri())) {
+ this.redirectUri = config.getOAuthRedirectUri();
+ } else {
+ errors.add(LanguageHelper.getErrorString("error.oa.oauth.redirecturi"));
+ }
} else {
- errors.add(LanguageHelper.getErrorString("error.oa.oauth.redirecturi"));
+ this.generateClientSecret();
}
}
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditOAAction.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditOAAction.java
index f6f742c5c..fc66eede4 100644
--- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditOAAction.java
+++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditOAAction.java
@@ -724,34 +724,21 @@ public class EditOAAction extends ActionSupport implements ServletRequestAware,
dboa.setType(Constants.MOA_CONFIG_BUSINESSSERVICE);
String num = generalOA.getIdentificationNumber().replaceAll(" ", "");
- String type = null;
if (num.startsWith(Constants.IDENIFICATIONTYPE_FN)) {
num = num.substring(Constants.IDENIFICATIONTYPE_FN.length());
num = at.gv.egovernment.moa.util.StringUtils.deleteLeadingZeros(num);
// num = StringUtils.leftPad(num, 7, '0');
- type = Constants.IDENIFICATIONTYPE_FN_TYPE;
}
- if (num.startsWith(Constants.IDENIFICATIONTYPE_ZVR)) {
- num = num.substring(Constants.IDENIFICATIONTYPE_ZVR.length());
- type = Constants.IDENIFICATIONTYPE_ZVR_TYPE;
- }
+ if (num.startsWith(Constants.IDENIFICATIONTYPE_ZVR)) num = num.substring(Constants.IDENIFICATIONTYPE_ZVR.length());
- if (num.startsWith(Constants.IDENIFICATIONTYPE_ERSB)) {
- num = num.substring(Constants.IDENIFICATIONTYPE_ERSB.length());
- type = Constants.IDENIFICATIONTYPE_ERSB_TYPE;
- }
+ if (num.startsWith(Constants.IDENIFICATIONTYPE_ERSB)) num = num.substring(Constants.IDENIFICATIONTYPE_ERSB.length());
IdentificationNumber idnumber = new IdentificationNumber();
- idnumber.setType(type);
- idnumber.setValue(
- Constants.PREFIX_WPBK +
- generalOA.getIdentificationType() +
- "+" +
- num);
-
+ idnumber.setValue(Constants.PREFIX_WPBK + generalOA.getIdentificationType() + "+" + num);
+
authoa.setIdentificationNumber(idnumber);
} else {