public static boolean hasScope(String targetScope){ for(String x : getScopes()){ if(x.equals(targetScope)) return true; } return false; }
this.scopes = scopes; this.claimSource = claimSource; OA2Scopes.ScopeUtil.setScopes(scopes); //Probably need a better place to do this at some point. Probably.
DebugUtil.dbg(this, ".resolveScopes: Scope util =" + OA2Scopes.ScopeUtil.getScopes()); DebugUtil.dbg(this, ".resolveScopes: server scopes=" + ((OA2SE) MyProxyDelegationServlet.getServiceEnvironment()).getScopes()); if (rawScopes == null || rawScopes.length() == 0) { while (stringTokenizer.hasMoreTokens()) { String x = stringTokenizer.nextToken(); if (!OA2Scopes.ScopeUtil.hasScope(x)) { throw new OA2RedirectableError(OA2Errors.INVALID_SCOPE, "Unrecognized scope \"" + x + "\"", state, givenRedirect); scopes = intersection(OA2Scopes.ScopeUtil.getScopes(), intersection(scopes, storedClientScopes)); DebugUtil.dbg(this, ".resolveScopes: after resolution=" + scopes);