createIdentity method
Future
createIdentity(
{ - required String category,
- String? identityOwner,
- String? redirectIdentity,
- String? redirectUrl,
- Map<String, dynamic>? acl,
- Map<String, dynamic>? attrs,
- Map<String, dynamic>? dattrs,
- Map<String, dynamic>? resources,
- dynamic accessNotifyPolicy,
- bool? isTemporary,
- List<String>? extensions,
})
Implementation
Future createIdentity({
required String category,
String? identityOwner,
String? redirectIdentity,
String? redirectUrl,
Map<String,dynamic>? acl,
Map<String,dynamic>? attrs,
Map<String,dynamic>? dattrs,
Map<String,dynamic>? resources,
dynamic? accessNotifyPolicy,
bool? isTemporary,
List<String>? extensions
}) async {
var url = '/create-identity';
var params = <String,dynamic>{
'category': category
};
if (identityOwner != null) {
params['identityOwner'] = identityOwner;
}
if (redirectIdentity != null) {
params['redirectIdentity'] = redirectIdentity;
}
if (redirectUrl != null) {
params['redirectUrl'] = redirectUrl;
}
if (acl != null) {
params['acl'] = acl;
}
if (attrs != null) {
params['attrs'] = attrs;
}
if (dattrs != null) {
params['dattrs'] = dattrs;
}
if (resources != null) {
params['resources'] = resources;
}
if (isTemporary != null) {
params['isTemporary'] = isTemporary;
}
if (accessNotifyPolicy != null) {
params['accessNotifyPolicy'] = accessNotifyPolicy;
}
if (extensions != null) {
params['extensions'] = extensions;
}
var resp = await _invoke(url, params, true);
if (resp['result'] != 'OK') throw resp['result'];
return resp['id'] as String;
}