Skip to content

Commit

Permalink
Merge branch '6.4.x'
Browse files Browse the repository at this point in the history
  • Loading branch information
jzheaux committed Dec 13, 2024
2 parents a6354e5 + e3cd433 commit 77f76f8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@
import org.springframework.security.oauth2.server.resource.authentication.BearerTokenAuthentication;
import org.springframework.security.oauth2.server.resource.authentication.BearerTokenAuthenticationToken;
import org.springframework.security.oauth2.server.resource.authentication.JwtAuthenticationToken;
import org.springframework.security.saml2.provider.service.authentication.DefaultSaml2AuthenticatedPrincipal;
import org.springframework.security.saml2.provider.service.authentication.TestSaml2Authentications;
import org.springframework.security.web.authentication.WebAuthenticationDetails;
import org.springframework.security.web.authentication.preauth.PreAuthenticatedAuthenticationToken;

Expand Down Expand Up @@ -232,6 +234,10 @@ class SpringSecurityCoreVersionSerializableTests {
return token;
});

// saml2-service-provider
generatorByClassName.put(DefaultSaml2AuthenticatedPrincipal.class,
(r) -> TestSaml2Authentications.authentication().getPrincipal());

// web
generatorByClassName.put(PreAuthenticatedAuthenticationToken.class, (r) -> {
PreAuthenticatedAuthenticationToken token = new PreAuthenticatedAuthenticationToken(user, "creds",
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

package org.springframework.security.saml2.provider.service.authentication;

import java.io.Serial;
import java.io.Serializable;
import java.util.Collections;
import java.util.List;
Expand All @@ -32,6 +33,9 @@
*/
public class DefaultSaml2AuthenticatedPrincipal implements Saml2AuthenticatedPrincipal, Serializable {

@Serial
private static final long serialVersionUID = -7601324133433139825L;

private final String name;

private final Map<String, List<Object>> attributes;
Expand Down

0 comments on commit 77f76f8

Please sign in to comment.