pharaoh_jwt_auth 1.0.0+2 copy "pharaoh_jwt_auth: ^1.0.0+2" to clipboard
pharaoh_jwt_auth: ^1.0.0+2 copied to clipboard

Pharaoh middleware that validates a JsonWebToken (JWT) and set the req.auth with the attributes

example/pharaoh_jwt_auth_example.dart

import 'package:pharaoh/pharaoh.dart';
import 'package:pharaoh_jwt_auth/pharaoh_jwt_auth.dart';

void main() async {
  final app = Pharaoh();

  app.use(jwtAuth(secret: () => SecretKey('some-secret-key')));

  app.get('/', (req, res) => res.ok('Hello World'));

  await app.listen();
}
1
likes
130
pub points
0%
popularity

Publisher

unverified uploader

Pharaoh middleware that validates a JsonWebToken (JWT) and set the req.auth with the attributes

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

dart_jsonwebtoken, pharaoh

More

Packages that depend on pharaoh_jwt_auth