@Override public Object getPrincipal() { return ProfileHelper.flatIntoOneProfile(profiles); }
private Optional<CommonProfile> getProfile() { return ProfileHelper.flatIntoOneProfile(profiles); }
private Optional<UserProfile> getProfile() { return ProfileHelper.flatIntoOneProfile(profiles); }
/** * Get the main profile of the authenticated user. * * @return the main profile */ public CommonProfile getProfile() { return ProfileHelper.flatIntoOneProfile(this.profiles).get(); }
/** * Get the main profile of the authenticated user. * * @return the main profile */ public CommonProfile getProfile() { return ProfileHelper.flatIntoOneProfile(this.profiles).get(); }
public Pac4JSecurityContext(SecurityContext original, JaxRsContext context, Collection<CommonProfile> profiles) { this.original = original; this.context = context; this.profiles = profiles; this.principal = ProfileHelper.flatIntoOneProfile(profiles).map(Pac4JPrincipal::new).orElse(null); }
/** * Get the main profile of the authenticated user. * * @return the main profile */ default CommonProfile getProfile() { return ProfileHelper.flatIntoOneProfile(getProfiles()).get(); }
public Optional<CommonProfile> profile() { return context.context() .flatMap(Pac4JSecurityContext::getProfiles) .flatMap(ps -> ProfileHelper.flatIntoOneProfile(ps)); } }
public Pac4jRememberMeAuthenticationToken(final List<CommonProfile> profiles) { super("rme", ProfileHelper.flatIntoOneProfile(profiles).get(), SpringSecurityHelper.buildAuthorities(profiles)); this.profiles = profiles; setAuthenticated(true); }
public Pac4jAuthenticationToken(final List<CommonProfile> profiles) { super(SpringSecurityHelper.buildAuthorities(profiles)); this.profiles = profiles; this.profile = ProfileHelper.flatIntoOneProfile(profiles).get(); setAuthenticated(true); }
public Pac4jAccount(final LinkedHashMap<String, CommonProfile> profiles) { this.roles = new HashSet<>(); this.profiles = ProfileHelper.flatIntoAProfileList(profiles); for (final CommonProfile profile : this.profiles) { final Set<String> roles = profile.getRoles(); for (final String role : roles) { this.roles.add(role); } } final CommonProfile profile = ProfileHelper.flatIntoOneProfile(this.profiles).get(); this.principal = () -> profile.getId(); }