Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Java
Posted by: Sungjoon Han
Added: Sep 4, 2019 12:00 PM
Modified: Sep 4, 2019 12:02 PM
Views: 2
Tags: no tags
  1. String schemaName = "IdentityAuthentication";
  2.         String schemaVersion = "1.2."+new Date().getTime();
  3.         List<String> schemaAttributes = new ArrayList<>();
  4.         schemaAttributes.add("name");
  5.         schemaAttributes.add("birth_date");
  6.         schemaAttributes.add("gender");
  7.         schemaAttributes.add("mno");
  8.         schemaAttributes.add("mobile_num");
  9.         schemaAttributes.add( "is_foreigner");
  10.  
  11.         // Schema 생성하기
  12.         String schemaId = ssi.createSchema(schemaName, schemaVersion, schemaAttributes).join();
  13.  
  14.         String credDefTag = "V1";
  15.  
  16.         // Credential Definition 생성하기
  17.         shared.setDemoCredDefId(ssi.createCredentialDefinition(schemaId, credDefTag, false).join());
  18.         return shared.getDemoCredDefId();