Skip to content

Commit

Permalink
Started adding OAuth2Login to reactive project
Browse files Browse the repository at this point in the history
  • Loading branch information
naturalprogrammer committed Dec 4, 2018
1 parent ee017ad commit ca2e567
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http)

formLogin(http); // Configure form login
authorizeExchange(http); // configure authorization
oauth2Login(http); // configure OAuth2 login

return http
.securityContextRepository(NoOpServerSecurityContextRepository.getInstance())
Expand All @@ -54,6 +55,14 @@ public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http)
.build();
}

/**
* Override this to configure oauth2 Login
*/
protected void oauth2Login(ServerHttpSecurity http) {

// Bypass here. OAuth2 login is needed only in the auth service
}

/**
* Override this to configure authorization
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,14 @@ protected String loginPage() {
return "/api/core/login";
}

/**
* Configure OAuth2 login
*/
@Override
protected void oauth2Login(ServerHttpSecurity http) {

http.oauth2Login(); // TODO: Configure properly
}

@Override
protected Mono<UserDto> fetchUserDto(JWTClaimsSet claims) {
Expand Down

0 comments on commit ca2e567

Please sign in to comment.