Skip to content
This repository has been archived by the owner on Jan 10, 2025. It is now read-only.

Commit

Permalink
OPHYK-175 Read user details from CAS attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
tsu committed Oct 8, 2024
1 parent 37af8bf commit d010c91
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 32 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
<dependency>
<groupId>fi.vm.sade.java-utils</groupId>
<artifactId>opintopolku-user-details-service</artifactId>
<version>0.2.0-SNAPSHOT</version>
<version>0.5.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>fi.vm.sade.java-utils</groupId>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package fi.vm.sade.varda.rekisterointi.configuration;

import fi.vm.sade.java_utils.security.OpintopolkuCasAuthenticationFilter;
import fi.vm.sade.javautils.kayttooikeusclient.OphUserDetailsServiceImpl;
import fi.vm.sade.properties.OphProperties;
import org.jasig.cas.client.session.SingleSignOutFilter;
import org.jasig.cas.client.validation.Cas20ProxyTicketValidator;
Expand Down Expand Up @@ -36,11 +37,9 @@ public class VirkailijaWebSecurityConfiguration extends WebSecurityConfigurerAda
private static final String VIRKAILIJA_PATH_CLOB = "/virkailija/**";

private final OphProperties ophProperties;
private final UserDetailsService userDetailsService;

VirkailijaWebSecurityConfiguration(OphProperties ophProperties, UserDetailsService userDetailsService) {
VirkailijaWebSecurityConfiguration(OphProperties ophProperties) {
this.ophProperties = ophProperties;
this.userDetailsService = userDetailsService;
}

@Override
Expand Down Expand Up @@ -91,7 +90,7 @@ public AuthenticationEntryPoint virkailijaAuthenticationEntryPoint() {
@Bean
public AuthenticationProvider virkailijaAuthenticationProvider() {
CasAuthenticationProvider casAuthenticationProvider = new CasAuthenticationProvider();
casAuthenticationProvider.setUserDetailsService(userDetailsService);
casAuthenticationProvider.setAuthenticationUserDetailsService(new OphUserDetailsServiceImpl());
casAuthenticationProvider.setServiceProperties(serviceProperties());
casAuthenticationProvider.setTicketValidator(ticketValidator());
casAuthenticationProvider.setKey("varda-rekisterointi");
Expand Down

0 comments on commit d010c91

Please sign in to comment.