A Dart SDK for seamless integration with Jframework APIs, supporting both API Key and Auth Key authentication flows.
- Dual Authentication Methods:
APIKeyheader for service-to-service authAuthKeyheader for user credential flows
- Complete User Management:
- CRUD operations for users
- Role-based permissions
- Devices Management:
- CRUD operations for devices
- CDN Management:
- Upload file cdn
Add to your pubspec.yaml:
dependencies: jfw_dart: ^1.0.0
final authProvider = AuthKeyProvider(null); final client = JfwClient( brandUrl: 'YOUR_BRAND_URL', authProvider: authProvider, );
final authService = AuthService(client); AuthenticateRequest request = AuthenticateRequest( username: 'user_username', // Replace with user's username password: 'user_password', // Replace with user's password ); // Login with credentials final authResponse = await authService.loginWithCredentials(request); // If the login is successful, the response will contain the auth key client.updateAuthProvider(AuthKeyProvider(response.authKey)); print('Login successful! Auth Key: ${response.authKey}');
// Subsequent requests will automatically include the Auth-Key header final userService = UserService(client); final user = await userService.getCurrentUser(); print('Current user: id=${user.id}, email=${user.emailAddress}, username=${user.username}');
- Fork the repository
- Create a feature branch (git checkout -b feature/AmazingFeature)
- Commit your changes (git commit -m 'Add amazing feature')
- Push to the branch (git push origin feature/AmazingFeature)
- Open a Pull Request