<commit_before><?php

/*
|--------------------------------------------------------------------------
| Ignition ignitionpowered.co.uk
|--------------------------------------------------------------------------
|
| This class extends the functionality of Ignition. You can add your
| own custom logic here.
|
*/

require_once APPPATH.'/controllers/ignition/auth.php';

class Auth extends IG_Auth {
	
}<commit_msg>Basic login API for app<commit_after><?php

/*
|--------------------------------------------------------------------------
| Ignition ignitionpowered.co.uk
|--------------------------------------------------------------------------
|
| This class extends the functionality of Ignition. You can add your
| own custom logic here.
|
*/

require_once APPPATH.'/controllers/ignition/auth.php';

class Auth extends IG_Auth {
	
	function appLogin(){
		$result['error'] = false;

		// read request body and decode into array
		$requestBody = json_decode(file_get_contents('php://input'),true); 

		// check that username exists
		if (array_key_exists("username", $requestBody)) {
		    $result['username'] = $requestBody["username"];
		} else {
			$result['error'] = true;
		}

		// return result
        echo json_encode($result);
	}

}
{'fraction_non_alphanumeric': 0.33924254633360196, 'fraction_numerical': 0.0, 'mean_word_length': 1.5346938775510204, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '6875955', 'n_tokens_mistral': 325, 'n_tokens_neox': 299, 'n_words': 81}