官术网_书友最值得收藏!

There's more...

For this recipe, we did not configure the base URL, which must be done to avoid issues when running your application behind a proxy. To do so, you might add the following bean declaration inside GoogleConfigurerAdapter:

@Bean 
public ConnectController connectController( 
      ConnectionFactoryLocator locator, 
      ConnectionRepository repository) { 
 
      ConnectController controller =  
            new ConnectController(locator, repository); 
      controller.setApplicationUrl("http://localhost:8080"); 
      return controller; 
} 

Do not forget to define the same redirect URL for the OAuth 2.0 Provider and to make all the communications through TLS/SSL.

To improve security configurations, you might use a database to store all users and respective credentials being held in a cryptographically manner (these features are provided by Spring Security and can be read about in the official documents at https://projects.spring.io/spring-security/).

主站蜘蛛池模板: 洛宁县| 岳西县| 双辽市| 固阳县| 桂林市| 白朗县| 清水县| 浦江县| 四川省| 丹寨县| 工布江达县| 平湖市| 新密市| 明溪县| 台安县| 临潭县| 荔波县| 连江县| 布尔津县| 西城区| 西乡县| 内黄县| 肥城市| 府谷县| 无棣县| 阿鲁科尔沁旗| 广宗县| 泸水县| 禹州市| 观塘区| 西峡县| 宣武区| 米脂县| 齐齐哈尔市| 稷山县| 电白县| 滦平县| 阜阳市| 安顺市| 玉龙| 赤壁市|