this.errorUri = accessor.getErrorUri(); this.additionalRequestParams = Maps.newHashMap(); this.allowedDomains = accessor.getAllowedDomains();
final boolean isAllowed = OAuth2Utils.isUriAllowed(request.getUri(), accessor.getAllowedDomains()); if (isAllowed) { String tokenType = accessToken.getTokenType();
request.setSecurityToken(new AnonymousSecurityToken("", 0L, accessor.getGadgetUri())); if (!OAuth2Utils.isUriAllowed(request.getUri(), accessor.getAllowedDomains())) { ret = new OAuth2HandlerError(OAuth2Error.AUTHORIZATION_CODE_PROBLEM, "Exception exchanging authorization code for access_token - domain not allowed", null);
if (!OAuth2Utils.isUriAllowed(request.getUri(), accessor.getAllowedDomains())) { ret = new OAuth2HandlerError(OAuth2Error.REFRESH_TOKEN_PROBLEM, "error fetching refresh token - domain not allowed", null);