コード例 #1
0
ファイル: ScopeService.java プロジェクト: trintech/oxAuth
 public static List<String> getScopeUrls(List<ScopeDescription> p_scopes) {
   final List<String> result = new ArrayList<String>();
   if (p_scopes != null && !p_scopes.isEmpty()) {
     for (ScopeDescription s : p_scopes) {
       final InternalExternal type = s.getType();
       if (type != null) {
         switch (type) {
           case EXTERNAL:
           case EXTERNAL_AUTO:
             result.add(s.getUrl());
             break;
           case INTERNAL:
             result.add(getInternalScopeUrl(s));
             break;
         }
       } else {
         result.add(s.getUrl());
       }
     }
   }
   return result;
 }
コード例 #2
0
ファイル: ScopeService.java プロジェクト: trintech/oxAuth
 private static String getInternalScopeUrl(ScopeDescription internalScope) {
   if (internalScope != null && internalScope.getType() == InternalExternal.INTERNAL) {
     return getScopeEndpoint() + "/" + internalScope.getId();
   }
   return "";
 }