Skip to content

Commit

Permalink
Update main who (#16)
Browse files Browse the repository at this point in the history
updated with changes from main

---------

Co-authored-by: silag <[email protected]>
Co-authored-by: Matthew Horridge <[email protected]>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Gheorghe Soimu <[email protected]>
  • Loading branch information
5 people authored Jul 4, 2024
1 parent eb32d3f commit a7bfbae
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public KeycloakLogoutHandler() {
public void logout(HttpServletRequest request, HttpServletResponse response,
Authentication auth) {
logoutFromKeycloak((Jwt) auth.getPrincipal());
super.logout(request, response,auth);
super.logout(request, response, auth);
}

private void logoutFromKeycloak(Jwt token) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,31 @@
package edu.stanford.protege.webprotege.gateway;

import org.springframework.context.annotation.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.Customizer;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityCustomizer;
import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.security.core.authority.mapping.GrantedAuthoritiesMapper;
import org.springframework.security.core.session.SessionRegistryImpl;
import org.springframework.security.oauth2.client.web.OAuth2LoginAuthenticationFilter;
import org.springframework.security.oauth2.core.oidc.user.OidcUserAuthority;
import org.springframework.security.oauth2.core.user.OAuth2UserAuthority;
import org.springframework.security.web.SecurityFilterChain;
import org.springframework.security.web.access.intercept.AuthorizationFilter;
import org.springframework.security.web.authentication.logout.LogoutFilter;
import org.springframework.security.web.authentication.session.*;
import org.springframework.security.web.authentication.logout.LogoutHandler;
import org.springframework.security.web.authentication.logout.SecurityContextLogoutHandler;
import org.springframework.security.web.authentication.session.RegisterSessionAuthenticationStrategy;
import org.springframework.security.web.authentication.session.SessionAuthenticationStrategy;

import java.util.*;
import java.util.Collection;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;

/**
Expand Down Expand Up @@ -61,7 +71,7 @@ public SecurityFilterChain resourceServerFilterChain(HttpSecurity http) throws E
.jwt(Customizer.withDefaults()));
http.oauth2Login(Customizer.withDefaults())
.logout(AbstractHttpConfigurer::disable);

return http.build();
}

Expand Down

0 comments on commit a7bfbae

Please sign in to comment.