made default scopes in client a bit more sensible

pull/306/merge
Justin Richer 2013-02-28 13:48:16 -05:00
parent 2a855a1952
commit 5dd6cce790
1 changed files with 6 additions and 2 deletions

View File

@ -56,6 +56,7 @@ import org.springframework.util.MultiValueMap;
import org.springframework.web.client.HttpClientErrorException; import org.springframework.web.client.HttpClientErrorException;
import org.springframework.web.client.RestTemplate; import org.springframework.web.client.RestTemplate;
import com.google.common.base.Strings;
import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableMap;
import com.google.gson.JsonElement; import com.google.gson.JsonElement;
import com.google.gson.JsonObject; import com.google.gson.JsonObject;
@ -188,8 +189,11 @@ public class AbstractOIDCAuthenticationFilter extends
Assert.notNull(errorRedirectURI, "An Error Redirect URI must be supplied"); Assert.notNull(errorRedirectURI, "An Error Redirect URI must be supplied");
// prepend the spec necessary DEFAULT_SCOPE if (Strings.isNullOrEmpty(scope)) {
setScope((scope != null && !scope.isEmpty()) ? DEFAULT_SCOPE + " " + scope : DEFAULT_SCOPE); setScope(DEFAULT_SCOPE);
} else {
setScope(scope);
}
} }
/* /*