decodeData method

  1. @override
JWTData decodeData(
  1. Uint8List data
)
override

Implementation

@override
JWTData decodeData(Uint8List data) {
  final List<String> params = utf8.decode(data).split(JWT_DELIMITER);

  JWTHeader header = JWTHeader.fromJson(jsonDecode(params[0]));
  JWTPayload payload = JWTPayload.fromJson(jsonDecode(params[1]));

  return JWTData(header, payload);
}