mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2025-06-06 18:30:57 +00:00
WIP: login process works properly
This commit is contained in:
parent
3fd44fe7af
commit
f8944fd2a9
@ -204,8 +204,7 @@ public class SecurityConfiguration {
|
|||||||
.equalsIgnoreCase("normal")) {
|
.equalsIgnoreCase("normal")) {
|
||||||
http.saml2Login(
|
http.saml2Login(
|
||||||
saml2 -> {
|
saml2 -> {
|
||||||
saml2.loginPage("/saml2")
|
saml2.relyingPartyRegistrationRepository(
|
||||||
.relyingPartyRegistrationRepository(
|
|
||||||
relyingPartyRegistrationRepository)
|
relyingPartyRegistrationRepository)
|
||||||
.successHandler(
|
.successHandler(
|
||||||
new CustomSAMLAuthenticationSuccessHandler(
|
new CustomSAMLAuthenticationSuccessHandler(
|
||||||
|
@ -1,10 +1,6 @@
|
|||||||
package stirling.software.SPDF.config.security.saml;
|
package stirling.software.SPDF.config.security.saml;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import org.opensaml.saml.saml2.core.Assertion;
|
import org.opensaml.saml.saml2.core.Assertion;
|
||||||
@ -57,7 +53,12 @@ public class ConvertResponseToAuthentication
|
|||||||
return Collections.emptySet();
|
return Collections.emptySet();
|
||||||
}
|
}
|
||||||
|
|
||||||
final List<Object> groups = new ArrayList<>(attributes.get(authoritiesAttributeName));
|
List<Object> groups = new ArrayList<>();
|
||||||
|
|
||||||
|
if (attributes.get(authoritiesAttributeName) != null) {
|
||||||
|
groups = new ArrayList<>(attributes.get(authoritiesAttributeName));
|
||||||
|
}
|
||||||
|
|
||||||
return groups.stream()
|
return groups.stream()
|
||||||
.filter(String.class::isInstance)
|
.filter(String.class::isInstance)
|
||||||
.map(String.class::cast)
|
.map(String.class::cast)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user