dpop_flutter 0.1.1 copy "dpop_flutter: ^0.1.1" to clipboard
dpop_flutter: ^0.1.1 copied to clipboard

An HTTP-client-agnostic implementation of OAuth 2.0 DPoP (RFC 9449) for Dart and Flutter. Produces sender-constrained Authorization/DPoP headers - bring your own HTTP client.

example/main.dart

import 'package:dpop_flutter/dpop_flutter.dart';

/// Minimal dpop_flutter quick start: initialize a key and build the
/// Authorization/DPoP headers for a single request.
Future<void> main() async {
  final dpop = DpopClient(keyStore: SecureDpopKeyStore());
  await dpop.initialize();

  final headers = await dpop.createHeaders(
    method: 'GET',
    uri: Uri.parse('https://api.example.com/profile'),
    accessToken: 'replace-with-a-real-access-token',
  );

  // {'Authorization': 'DPoP replace-with-a-real-access-token', 'DPoP': '<proof-jwt>'}
  // ignore: avoid_print
  print(headers);
}
1
likes
150
points
36
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

An HTTP-client-agnostic implementation of OAuth 2.0 DPoP (RFC 9449) for Dart and Flutter. Produces sender-constrained Authorization/DPoP headers - bring your own HTTP client.

Repository (GitHub)
View/report issues
Contributing

Topics

#dpop #oauth #oauth2 #security #authentication

License

MIT (license)

Dependencies

flutter, flutter_secure_storage, webcrypto

More

Packages that depend on dpop_flutter