@GetMapping("/sign-in")
    Mono<JwtToken> signIn(@RequestParam("login") String login,//FIXME use Auth header with basic auth
                          @RequestParam("password") String password) {
        return userRepository.findByEmailOrMobile(login, login)
                .filter(u -> u.validatePassword(password))
                .map(this::createToken)
                .map(Mono::just)
                .orElseThrow(() -> new IllegalArgumentException("Invalid login or password"));
    }
@GetMapping("/sign-in")
    Mono<JwtToken> signIn(@RequestParam("login") String login
                          @RequestParam("password") String password) {
        return userRepository.findByEmailOrMobile(login, login)
                .filter(u -> u.validatePassword(password))
                .map(this::createToken)
                .map(Mono::just)
                .orElseThrow(() -> new IllegalArgumentException("Invalid login or password"));
    }
@getmapping("/sign-in") mono<jwttoken> signin(@requestparam("login") string login @requestparam("password") string password) { return userrepository.findbyemailormobile(login, login) .filter(u -> u.validatepassword(password)) .map(this::createtoken) .map(mono::just) .orelsethrow(() -> new illegalargumentexception("invalid login or password")); }