<commit_before>package com.github.noxan.aves.auth.storage;

import java.util.HashMap;
import java.util.Map;

public class InMemoryUsernamePasswordStorage {
    private Map<String, String> users;

    public InMemoryUsernamePasswordStorage() {
        users = new HashMap<String, String>();
    }

    public void addUser(String username, String password) {
        users.put(username, password);
    }
}<commit_msg>implement requestUser method in inmemory storage to check if user exists and try to login<commit_after>package com.github.noxan.aves.auth.storage;

import java.util.HashMap;
import java.util.Map;

import com.github.noxan.aves.auth.accessor.UsernamePasswordAccessor;

public class InMemoryUsernamePasswordStorage {
    private Map<String, String> users;

    public InMemoryUsernamePasswordStorage() {
        users = new HashMap<String, String>();
    }

    public void addUser(String username, String password) {
        users.put(username, password);
    }

    public String requestUser(UsernamePasswordAccessor accessor) {
        if (accessor.checkPassword(users.get(accessor.getUsername()))) {
            return accessor.getUsername();
        }
        return null;
    }
}
{'fraction_non_alphanumeric': 0.09440267335004177, 'fraction_numerical': 0.0, 'mean_word_length': 3.7351778656126484, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5109471', 'n_tokens_mistral': 328, 'n_tokens_neox': 321, 'n_words': 80}