# SEF WP Security Guard — License Server Integration

This build is connected to the SEF Laravel License & Update Server.

## Product record required on the license server

Create a product with these exact values:

- Name: SEF WP Security Guard
- Slug: `sef-wp-security-guard`
- Type: `wordpress_plugin`
- Status: `active`

The slug must match the plugin client code exactly. Do not rename it later unless you also update this plugin.

## Client setup

In WordPress admin:

1. Go to **SEF Security → License & Updates**.
2. Server URL: `https://license.sefsolution.com`
3. Paste the license key.
4. Click **Save License Settings**.
5. Click **Activate License**.

## Update delivery

When you have a new version:

1. Build and test the plugin ZIP on your PC.
2. Go to the Laravel license server.
3. Open **Products → SEF WP Security Guard → Create Update Version**.
4. Upload the tested ZIP.
5. Set the version, changelog, and minimum required version.
6. Check **Mark as active latest version**.
7. Save.

Licensed client websites will receive the update through WordPress Dashboard updates.

## API used by the plugin

- License activate: `/api/v1/license/activate`
- License verify: `/api/v1/license/verify`
- License deactivate: `/api/v1/license/deactivate`
- Update check: `/api/v1/wp/plugin/update-check`

## Security

The plugin never stores package ZIP links permanently. The license server should return short-lived signed package URLs only after license, domain, product, and version checks pass.


## 1.2.2 hotfix

- Sends both `license_key` and `token` to the Laravel License Server activation/verification endpoints.
- Fixes Laravel validation message: `The token field is required.`
