pharaoh_basic_auth 1.0.0+1 pharaoh_basic_auth: ^1.0.0+1 copied to clipboard
Simple plug & play HTTP basic authentication middleware for Pharaoh.
example/pharaoh_basic_auth_example.dart
import 'package:pharaoh/pharaoh.dart';
import 'package:pharaoh_basic_auth/src/basic_auth.dart';
void main() async {
final app = Pharaoh();
app.use(basicAuth(users: {"foo": "foo-bar-pass"}));
app.get('/', (req, res) => res.ok('Hurray 🔥'));
await app.listen();
}