Examples of UsuarioUserDetails


Examples of br.com.kuntzer.rodrigo.cursoviasoft.web.security.UsuarioUserDetails

    if(StringUtils.isNotEmpty(company) && NumberUtils.isNumber(company)){
      Long idempresa = Long.valueOf(company);
      Usuario usuario = usuarioRepository.obterUsuarioPorUsernameAndEmpresa(username, idempresa);
      if(usuario != null){
        Empresa empresa = empresaRepository.obterPorId(idempresa);
        return new UsuarioUserDetails(usuario, empresa);
      }
    }
    throw new UsernameNotFoundException("login.user.notfound");
  }
View Full Code Here

Examples of br.com.kuntzer.rodrigo.cursoviasoft.web.security.UsuarioUserDetails

  @Override
  public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
    Usuario usuario = usuarioRepository.obterUsuarioPorUsername(username);
    if(usuario != null){
      return new UsuarioUserDetails(usuario, null);
    }
    throw new UsernameNotFoundException("login.user.notfound");
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.