View HelloControllerWithRedditWebClient.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@RestController | |
public class HelloController { | |
private final WebClient webClient; | |
public HelloController(@Qualifier("redditWebClient") WebClient webClient) { | |
this.webClient = webClient; | |
} | |
@GetMapping | |
public Mono<String> hello() { |
View application-google-oauth2.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
spring: | |
security: | |
oauth2: | |
client: | |
registration: | |
google: | |
client-id: googleIssuedId | |
client-secret: googleIssuedSecret |
View application-reddit-oauth2.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
spring: | |
security: | |
oauth2: | |
client: | |
registration: | |
reddit: | |
clientId: redditIssuedId | |
clientSecret: redditIssuedSecret | |
redirectUri: http://localhost:8080/login/oauth2/code/reddit | |
scope: |
View SecurityConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Configuration | |
public class SecurityConfig { | |
@Bean | |
public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) { | |
http | |
.authorizeExchange().anyExchange().authenticated() | |
.and() | |
.oauth2Login(); | |
return http.build(); | |
} |
View HelloController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@RestController | |
public class HelloController { | |
@GetMapping | |
public Mono<String> hello() { | |
return Mono.just("Hello, Medium"); | |
} | |
} |
View WebFluxConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Configuration | |
@EnableWebFlux | |
public class WebFluxConfig implements WebFluxConfigurer { | |
} |
View gist:dc0a78253485264f392cac7da4f71657
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am rj93 on github. | |
* I am rj93 (https://keybase.io/rj93) on keybase. | |
* I have a public key ASArMY44eY3XYI394UjYuLLrW9hm7UC2dRNnDCboXeEhJgo | |
To claim this, I am signing this object: |