# ngauge-users

User authentication and session management module for NGauge.

Extracted from `NGauge_Base/api/modules/v1/controllers/UserController`.

## Features
- Login endpoint returning an access token
- Wraps `common\models\Loginform` behind a service boundary

## Installation

```bash
composer require portalpeople/ngauge-users
```

## Configuration

### 1. Register in app config (`api/config/main.php`)

```php
return [
    'bootstrap' => ['ngauge-users'],
    'modules' => [
        'ngauge-users' => [
            'class' => 'PortalPeople\\users\\Module',
        ],
    ],
];
```

### 2. No additional params required

The module has no sensitive config keys. If needed in future, add to `params-local.php`:

```php
return [
    'plugins' => [
        'ngauge-users' => [
            // future config keys here
        ],
    ],
];
```

## Endpoints

- `POST /v1/user/login` — authenticate and return access token
