quixxi 0.0.1 quixxi: ^0.0.1 copied to clipboard
Flutter plugin for adding SSL Pinning to application, Prevent copy and paste inside the application.
Quixxi Plugin #
Quixxi Plugin for protecting your application from security threats likes Man in the Middle(MiTM) Attack, Copying sensitive information from application. Quixxi provides two controls for protecting application from theses attacks.
Quixxi Shield must be applied after adding this plugin to your application. Quixxi shield supports shielding for android, iOS and cross platform apps like flutter, react, etc.
Note: Plugin will not validate SSL certificate in debug build. Quixxi shield must be added in release build to add SSL Pinning to your appliication.
Getting Started #
In your flutter or dart project add the dependency:
dependencies:
...
quixxi: 0.0.1
Usage example #
SSL Pinning #
Using Dio
import 'package:quixxi/services.dart';
Dio dio = getDioClient("https://yourdomain.com");
void apiCall() async {
var header = {'Content-type': 'application/json; charset=utf-8'};
try {
final response = await dio.get("https://yourdomain.com/yourapi",
options: Options(headers: header));
if (response.statusCode == 200) {
apiResponse.value = response.data.toString();
} else {
print('${response.statusCode} : ${response.data.toString()}');
apiResponse.value = response.data.toString();
}
} catch (error) {
apiResponse.value = error.toString();
}
}
Using Http
import 'package:quixxi/services.dart';
SecureHttpClient secureHttpClient = getSecureHttpClient();
void apiCall2() async{
var header = {'Content-type': 'application/json; charset=utf-8'};
try {
Uri uri = Uri.parse("https://gorest.co.in/public/v2/todos");
final response = await secureHttpClient.get(uri, headers: header);
if (response.statusCode == 200) {
apiResponse.value = response.body.toString();
}else{
print('${response.statusCode} : ${response.body.toString()}');
apiResponse.value = response.body.toString();
}
} catch (error) {
apiResponse.value = error.toString();
}
}
Custom Implementation
import 'package:quixxi/services.dart';
Future myCustomImplementation(String url, Map<String,String> headers) async {
try{
final secure = await SSLCertificatePinning().check(
serverURL: url,
headerHttp: headers,
timeout : 50
);
if(secure.contains("CONNECTION_SECURE")){
return true;
}else{
return false;
}
}catch(e){
return false;
}
}
Copy & Paste Prevention #
Secure Text Field
import 'package:quixxi/text_field/quixxi_text_form_field.dart';
const customTxt(text: 'Quixxi Textfield'),
Container(
padding: const EdgeInsets.symmetric(vertical: 15),
child: QuixxiTextField(
decoration: const InputDecoration(
border: UnderlineInputBorder(),
hintText: 'https://yourdomain.com',
),
keyboardType: TextInputType.url,
textInputAction: TextInputAction.next,
controller: TextEditingController(
text: "https://yourdomain.com"),
),
)
Secure Text Form Field
import 'package:quixxi/text_field/quixxi_text_form_field.dart';
const customTxt(text: 'Quixxi TextFormfield'),
Container(
padding: const EdgeInsets.symmetric(vertical: 15),
child: QuixxiTextFormField(
decoration: const InputDecoration(
border: UnderlineInputBorder(),
hintText: 'https://yourdomain.com',
),
keyboardType: TextInputType.url,
textInputAction: TextInputAction.next,
controller: TextEditingController(
text: "https://yourdomain.com"),
onSaved: (value) {},
validator: (value) {},
),
)
Adding Quixxi Shield to application #
- Create an account in https://portal.quixxi.com
- Create application container in your account.
- Upload your application to portal.
- Select Option SSL Certificate validation via SSL Pinning in shield config
- Wait for Shielding to complete
- Download protected application from portal.