Last active
March 28, 2017 10:30
-
-
Save dfpalomar/b60b6240b22ac4f56ab6e93bc9381b35 to your computer and use it in GitHub Desktop.
TagDescriptor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This class describes the configuration of the Yoti Tag payload. | |
*/ | |
@Getter | |
public class TagDescriptor { | |
private final Key piccMasterKey; | |
private final List<Application> applications; | |
public TagDescriptor(Key piccMasterKey, List<Application> applications) { | |
this.piccMasterKey = piccMasterKey; | |
this.applications = applications; | |
} | |
/** | |
* Describes the configuration and content of an application. | |
*/ | |
@Getter | |
public static class Application { | |
private final int id; | |
private final Key key; | |
private final List<File> files; | |
public Application(int id, Key key, List<File> files) { | |
this.id = id; | |
this.key = key; | |
this.files = files; | |
} | |
} | |
/** | |
* Describes the configuration of a file. | |
*/ | |
@Getter | |
public static class File { | |
private final int id; | |
private final Key key; | |
private final Attribute attribute; | |
public File(int id, Key key, Attribute attribute) { | |
this.id = id; | |
this.key = key; | |
this.attribute = attribute; | |
} | |
} | |
/** | |
* Describes a key | |
*/ | |
@Getter | |
public static class Key { | |
final int version; | |
final String value; | |
public Key(int version, String value) { | |
this.version = version; | |
this.value = value; | |
} | |
} | |
/** | |
* Attributes of the Yoti tag payload | |
*/ | |
public enum Attribute { | |
TAG_VERSION, | |
TAG_EXPIRATION_DATE, | |
LOST_FOUND_URL, | |
UID, | |
GIVEN_NAMES, | |
SURNAME, | |
DOB, | |
SELFIE | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment