Spring social OAuth2 callback (Illegal base64 character 20)

260
20 октября 2017, 12:11

Добрый день!

Пытаюсь реализовать мануал https://spring.io/guides/gs/accessing-facebook/. Поскольку я работаю через прокси, то пришлось еще создать класс.

package facebook;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import org.springframework.core.env.Environment;
import org.springframework.social.config.annotation.ConnectionFactoryConfigurer;
import org.springframework.social.config.annotation.EnableSocial;
import org.springframework.social.config.annotation.SocialConfigurerAdapter;
@Configuration
@EnableSocial
public class SocialConfig extends SocialConfigurerAdapter {
@Override
public void addConnectionFactories(ConnectionFactoryConfigurer cfConfig, Environment env)
   {
        System.setProperty( "http.proxyPort", "8080" );
        System.setProperty( "https.proxyPort", "8080" );
        System.setProperty( "http.proxyHost", "xxxx.xx" );
        System.setProperty( "https.proxyHost", "xxxx.xx" );
        System.setProperty( "http.proxyUser", "xxxx" );
        System.setProperty( "http.proxyPassword", "xxxxx" );
    }
}

И столкнулся с такой проблемой. Когда пытаюсь авторизоваться в facebook получаю такую ошибку -

Exception while handling OAuth2 callback (Illegal base64 character 20). Redirecting to facebook connection status page.

Гугл не дал ответа. Кто может помочь как исправить эту ошибку?