/** * User repository provider. * * @return User repository provider. */ private IUserRepository getUser() { return iamProvider[0].getConfiguration().getUserRepository(); }
/** * User repository provider. * * @return User repository provider. */ protected IUserRepository getUser() { return iamProvider[0].getConfiguration().getUserRepository(); }
/** * User repository provider. * * @return User repository provider. */ private UserLdapRepository getUser() { return (UserLdapRepository) iamProvider[0].getConfiguration().getUserRepository(); } }
private Function<String, ? extends UserOrg> toUser() { return iamProvider[0].getConfiguration().getUserRepository()::toUser; }
/** * User repository provider. * * @return User repository provider. */ protected IUserRepository getUser() { return iamProvider.getConfiguration().getUserRepository(); }
/** * User repository provider. * * @return User repository provider. */ protected IUserRepository getUser() { return iamProvider[0].getConfiguration().getUserRepository(); }
@Override public boolean checkStatus(final String node, final Map<String, String> parameters) { // Query the LDAP, the user is not important, we expect no error, that's all self.getConfiguration(node).getUserRepository().findByIdNoCache("-any-"); return true; }
@Override public Authentication authenticate(final Authentication authentication, final String node, final boolean primary) { final UserLdapRepository repository = (UserLdapRepository) self.getConfiguration(node).getUserRepository(); // Authenticate the user if (repository.authenticate(authentication.getName(), (String) authentication.getCredentials())) { // Return a new authentication based on resolved application user return primary ? authentication : new UsernamePasswordAuthenticationToken(toApplicationUser(repository, authentication), null); } throw new BadCredentialsException(""); }
/** * {@link ParameterValue} JPA to business object transformer. * * @param entity * The parameter value. * @return The parameter value with parameter definition. */ public ParameterValueVo toVo(final ParameterValue entity) { final ParameterValueVo vo = new ParameterValueVo(); vo.copyAuditData(entity, (Function<String, SimpleUserOrg>) iamProvider[0].getConfiguration().getUserRepository()::toUser); vo.setId(entity.getId()); vo.setParameter(ParameterResource.toVo(entity.getParameter())); // Map node if (entity.getNode() != null) { vo.setNode(NodeResource.toVo(entity.getNode())); } // Map criteria value parseValue(entity, vo); return vo; }