summaryrefslogtreecommitdiffstats
path: root/auth/auth-deforg
diff options
context:
space:
mode:
authorInstrumental <jonathan.gathman@att.com>2019-11-27 15:57:10 -0600
committerInstrumental <jonathan.gathman@att.com>2019-11-27 15:57:14 -0600
commitd131f7ed38fd65d7f04b7d71368ba03e9000665c (patch)
treeb7e9d1fa5662251f1f20c0ca79d9c94c8f5b1f54 /auth/auth-deforg
parentdb3e010fec901487ca23199566ff205a523f7b45 (diff)
Fixes from Regression Tests
Issue-ID: AAF-1058 Change-Id: I7d3ace9cef69a163c2ec0c9a48583fdfa9ca20af Signed-off-by: Instrumental <jonathan.gathman@att.com>
Diffstat (limited to 'auth/auth-deforg')
-rw-r--r--auth/auth-deforg/src/main/java/org/onap/aaf/org/DefaultOrg.java19
1 files changed, 19 insertions, 0 deletions
diff --git a/auth/auth-deforg/src/main/java/org/onap/aaf/org/DefaultOrg.java b/auth/auth-deforg/src/main/java/org/onap/aaf/org/DefaultOrg.java
index 46d3db9b..70b3324a 100644
--- a/auth/auth-deforg/src/main/java/org/onap/aaf/org/DefaultOrg.java
+++ b/auth/auth-deforg/src/main/java/org/onap/aaf/org/DefaultOrg.java
@@ -637,6 +637,25 @@ public class DefaultOrg implements Organization {
}
return false;
}
+
+ @Override
+ public String supportedDomain(String user) {
+ if(user!=null) {
+ int after_at = user.indexOf('@')+1;
+ if(after_at<user.length()) {
+ String ud = FQI.reverseDomain(user);
+ if(ud.startsWith(getDomain())) {
+ return getDomain();
+ }
+ for(String s : supportedRealms) {
+ if(ud.startsWith(s)) {
+ return FQI.reverseDomain(s);
+ }
+ }
+ }
+ }
+ return null;
+ }
@Override
public synchronized void addSupportedRealm(final String r) {