- OAuth 2.0 Cookbook
- Adolfo Eloy Nascimento
- 119字
- 2021-07-08 09:35:06
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/).
推薦閱讀
- ASP.NET Core:Cloud-ready,Enterprise Web Application Development
- Mastering Entity Framework Core 2.0
- 密碼學(xué)原理與Java實(shí)現(xiàn)
- JavaScript語(yǔ)言精髓與編程實(shí)踐(第3版)
- FFmpeg入門詳解:音視頻流媒體播放器原理及應(yīng)用
- 深入淺出DPDK
- PhpStorm Cookbook
- 深入淺出PostgreSQL
- Spring Boot+Vue全棧開發(fā)實(shí)戰(zhàn)
- 大話Java:程序設(shè)計(jì)從入門到精通
- Building Serverless Architectures
- Buildbox 2.x Game Development
- Python數(shù)據(jù)可視化之美:專業(yè)圖表繪制指南(全彩)
- C語(yǔ)言程序設(shè)計(jì)
- Node.js區(qū)塊鏈開發(fā)