gatekeeper_weebi 1.0.0 copy "gatekeeper_weebi: ^1.0.0" to clipboard
gatekeeper_weebi: ^1.0.0 copied to clipboard

Session coordination, device enrollment, and permission management for Weebi applications

Gatekeeper πŸ›‘οΈ #

Session coordination and access management for Weebi applications

Gatekeeper manages:

  • Device enrollment and identity
  • User session management
  • Token coordination (access + refresh)
  • Permission management (from JWT tokens)
  • Mail management

Architecture #

Gatekeeper Package
β”œβ”€β”€ Gatekeeper - Main coordinator class
β”œβ”€β”€ Gatekeeper - Abstract base class
β”œβ”€β”€ DeviceManager - Device enrollment & identity
β”œβ”€β”€ UserSession - User info cache
β”œβ”€β”€ MailManager - User mail operations
└── Integrates with auth_weebi for token & permission handling

Quick Start #

Installation #

Add to your pubspec.yaml:

dependencies:
  gatekeeper_weebi:
    path: ../gatekeeper  # or version from registry

Usage #

import 'package:gatekeeper_weebi/gatekeeper_weebi.dart';
import 'package:auth_weebi/auth_weebi.dart';

// Create gatekeeper
final gatekeeper = Gatekeeper(
  deviceService,
  accessTokenProvider,
  persistedTokenProvider,
);

// Restore tokens on startup
await gatekeeper.restoreAllTokens();

// Login
await gatekeeper.setTokens(
  accessToken: response.accessToken,
  refreshToken: response.refreshToken,
);
gatekeeper.setUserInfo(response.user);

// Check permissions
if (gatekeeper.canCreateArticle) {
  // User can create articles
}

// Logout
await gatekeeper.clearSession();

Documentation #

See GATEKEEPER_INTEGRATION_GUIDE.md for complete integration guide with:

  • Multi Provider setup
  • Login/logout flows
  • Permission checks
  • Token management
  • API reference

Benefits #

For Client Apps #

  • Simple API: Single class for all session management
  • Foolproof: Can't forget to clear tokens
  • Offline-First: Works consistently regardless of connectivity
  • Reactive: Integrates with Provider/Riverpod patterns

For Architecture #

  • Separation of Concerns: Infrastructure separate from app logic
  • Single Responsibility: Each service has one job
  • Clean Dependencies: Auth utilities β†’ Gatekeeper β†’ App logic
  • Reusable: Use in multiple apps (POS, admin, web, etc.)

Package Dependencies #

  • auth_weebi - Token storage and JWT parsing
  • models_weebi - Data models
  • services_weebi - Service abstractions
  • protos_weebi - Protocol buffers

License #

Proprietary - Weebi SAS

Support #

For issues and questions, contact the Weebi team.

0
likes
40
points
14
downloads

Publisher

verified publisherweebi.com

Weekly Downloads

Session coordination, device enrollment, and permission management for Weebi applications

Homepage

License

unknown (license)

Dependencies

auth_weebi, models_weebi, protos_weebi, services_weebi

More

Packages that depend on gatekeeper_weebi