summaryrefslogtreecommitdiffstats
path: root/auth/auth-cass
diff options
context:
space:
mode:
Diffstat (limited to 'auth/auth-cass')
-rw-r--r--auth/auth-cass/src/main/java/org/onap/aaf/auth/direct/DirectRegistrar.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/auth/auth-cass/src/main/java/org/onap/aaf/auth/direct/DirectRegistrar.java b/auth/auth-cass/src/main/java/org/onap/aaf/auth/direct/DirectRegistrar.java
index 1e8faa2b..695d80f7 100644
--- a/auth/auth-cass/src/main/java/org/onap/aaf/auth/direct/DirectRegistrar.java
+++ b/auth/auth-cass/src/main/java/org/onap/aaf/auth/direct/DirectRegistrar.java
@@ -63,8 +63,13 @@ public class DirectRegistrar implements Registrant<AuthzEnv> {
locate.patch = split.length>2?Integer.parseInt(split[2]):0;
locate.minor = split.length>1?Integer.parseInt(split[1]):0;
locate.major = split.length>0?Integer.parseInt(split[0]):0;
-
- locate.hostname = access.getProperty(Config.HOSTNAME, Inet4Address.getLocalHost().getHostName());
+ locate.hostname = access.getProperty(Config.CADI_REGISTRATION_HOSTNAME, null);
+ if(locate.hostname==null) {
+ locate.hostname = access.getProperty(Config.HOSTNAME, null);
+ }
+ if(locate.hostname==null) {
+ locate.hostname = Inet4Address.getLocalHost().getHostName();
+ }
String subprotocols = access.getProperty(Config.CADI_PROTOCOLS, null);
if(subprotocols==null) {
locate.protocol="http";