# nowhub-plugin-rust

Rust SDK surface for Axis pay-plugin authorization checks.

## Install

```toml
[dependencies]
nowhub-plugin-rust = "1.0.0"
```

The crate mirrors the Node pay-plugin contract:

- cached license verification is attempted first
- cache misses create a platform authorization session
- the host opens `login_url`
- the SDK polls until authorization, cancellation, expiry, or failure
- successful platform authorization writes the returned license token to cache

The crate intentionally exposes small traits for host-specific concerns:

- `PlatformClient`: HTTP transport for Axis platform APIs
- `BrowserOpener`: browser or deep-link launcher
- `CacheStore`: cache persistence
- `LicenseVerifier`: host-selected JWT/JWS verification implementation

Default `PayPluginConfig::rust(...)` reports `client_type=rust`.

## Quick start

```rust
use nowhub_plugin_rust::PayPlugin;
```

Run tests after installing the Rust toolchain:

```bash
cargo test -p nowhub-plugin-rust
```
