Skip to content

Commit

Permalink
perf($api-gateway): refine slf4j Logger
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnymillergh committed Apr 14, 2021
1 parent e3687a3 commit af590f5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,6 @@ public PasswordEncoder passwordEncoder() {
return new BCryptPasswordEncoder();
}

@Bean
public ReactiveAuthorizationManager<AuthorizationContext> reactiveAuthorizationManager() {
return new RbacReactiveAuthorizationManagerImpl(authCenterRemoteApi);
}

@Bean
public ServerSecurityContextRepository serverSecurityContextRepository(ReactiveAuthenticationManager reactiveAuthenticationManager) {
return new JwtReactiveServerSecurityContextRepositoryImpl(mafConfiguration, reactiveAuthenticationManager,
Expand All @@ -107,4 +102,9 @@ public ServerSecurityContextRepository serverSecurityContextRepository(ReactiveA
public ReactiveAuthenticationManager reactiveAuthenticationManager() {
return new JwtReactiveAuthenticationManagerImpl(authCenterRemoteApi);
}

@Bean
public ReactiveAuthorizationManager<AuthorizationContext> reactiveAuthorizationManager() {
return new RbacReactiveAuthorizationManagerImpl(authCenterRemoteApi);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
import com.jmsoftware.maf.common.exception.BusinessException;
import com.jmsoftware.maf.common.exception.SecurityException;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.HttpStatus;
import org.springframework.security.authentication.*;
import org.springframework.security.core.Authentication;
Expand All @@ -21,9 +22,9 @@
*
* @author Johnny Miller (锺俊), email: johnnysviva@outlook.com, date: 12/29/2020 9:57 AM
**/
@Slf4j
@RequiredArgsConstructor
public class JwtReactiveAuthenticationManagerImpl implements ReactiveAuthenticationManager {
private final static Logger log = LoggerFactory.getLogger(JwtReactiveAuthenticationManagerImpl.class);
private final AuthCenterRemoteApi authCenterRemoteApi;

private final UserDetailsChecker preAuthenticationChecks = user -> {
Expand Down

0 comments on commit af590f5

Please sign in to comment.