Skip to main content

Crate perfgate_auth

Crate perfgate_auth 

Source
Expand description

Authentication and authorization types for perfgate.

Provides API key management, permission scopes, and role-based access control types used by the perfgate baseline service.

Part of the perfgate workspace.

§Example

use perfgate_auth::{generate_api_key, API_KEY_PREFIX_LIVE};

let key = generate_api_key(false);
assert!(key.starts_with(API_KEY_PREFIX_LIVE));

Structs§

ApiKey
Represents an authenticated API key.
JwtClaims
JWT claims accepted by the server.

Enums§

Role
Role-based access control.
Scope
Permission scope for API operations.

Constants§

API_KEY_PREFIX_LIVE
API key prefix for live keys.
API_KEY_PREFIX_TEST
API key prefix for test keys.

Functions§

generate_api_key
Creates a new API key string.
validate_key_format
Validates API key format.