INNER CODE UNIT · Java

Pac4jAuthenticationToken

pac4j/spring-security-pac4j · src/main/java/org/pac4j/springframework/security/authentication/Pac4jAuthenticationToken.java:16

public class Pac4jAuthenticationToken extends AbstractAuthenticationToken implements Pac4jAuthentication {

    private final List<UserProfile> profiles;
    private final UserProfile profile;

    public Pac4jAuthenticationToken(final List<UserProfile> profiles) {
        super(SpringSecurityHelper.buildAuthorities(profiles));
        this.profiles = profiles;
        this.profile = ProfileHelper.flatIntoOneProfile(profiles).get();
        setAuthenticated(true);
    }

    @Override
    public String getName() {
        return profile.getId();
    }

    @Override

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…