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:37 PM
Views: 8
Tags: no tags
  1. String name = "proof";
  2.         String version = "0.1";
  3.         List<RequestAttribute> requestAttributes = Arrays.asList(
  4.             new RequestAttribute(
  5.                 "name",
  6.                 new Restrictions(null, shared.getDemoCredDefId()), // 특정 Credential 의 attribute 요청
  7.                 true)
  8.         );
  9.  
  10.         List<PredicateAttribute> predicateAttributes = Arrays.asList(
  11.             new PredicateAttribute(
  12.                 "birth_date",
  13.                 PredicateCondition.LE,
  14.                 20000101,
  15.                 new Restrictions(null, shared.getDemoCredDefId())) // 특정 Credential 의 attribute Predicate condition
  16.         );
  17.  
  18.         List<SelfAttestedAttribute> selfAttestedAttributes = Arrays.asList(
  19.             new SelfAttestedAttribute("name") // Self Attested Attribute
  20.         );
  21.         return new PresentationRequest(name, version, requestAttributes, predicateAttributes, selfAttestedAttributes);