Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

missing io.twentysixty.demos.auth.request.citizenId #12

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -143,6 +143,11 @@ public class Service {
@ConfigProperty(name = "io.twentysixty.demos.auth.messages.root.menu.option1")
String ROOT_MENU_OPTION1;

@ConfigProperty(name = "io.twentysixty.demos.auth.messages.root.menu.no_cred")
Optional<String> ROOT_MENU_NO_CRED;



@ConfigProperty(name = "io.twentysixty.demos.auth.messages.option1")
String OPTION1_MSG;

@@ -170,6 +175,7 @@ public void newConnection(UUID connectionId) throws Exception {

mtProducer.sendMessage(this.getRootMenu(connectionId, null));

mtProducer.sendMessage(this.getIdentityCredentialRequest(connectionId, null));
//entryPointCreate(connectionId, null, null);
}

@@ -507,10 +513,27 @@ public BaseMessage getRootMenu(UUID connectionId, Session session) {
if ((session == null) || (session.getAuthTs() == null) ){
menu.setDescription(getMessage("ROOT_MENU_DEFAULT_DESCRIPTION"));
options.add(ContextualMenuItem.build(CMD_ROOT_MENU_AUTHENTICATE, getMessage("ROOT_MENU_AUTHENTICATE"), null));
options.add(ContextualMenuItem.build(CMD_ROOT_MENU_NO_CRED, getMessage("ROOT_MENU_NO_CRED"), null));
if (ROOT_MENU_NO_CRED.isPresent()) {
options.add(ContextualMenuItem.build(CMD_ROOT_MENU_NO_CRED, ROOT_MENU_NO_CRED.get(), null));
} else {
options.add(ContextualMenuItem.build(CMD_ROOT_MENU_NO_CRED, getMessage("ROOT_MENU_NO_CRED"), null));
}


} else {
menu.setDescription(getMessage("ROOT_MENU_AUTHENTICATED_DESCRIPTION").replaceAll("NAME", session.getFirstname() + " " + session.getLastname()));
if ((session.getFirstname() != null) && (session.getLastname() != null)) {
menu.setDescription(getMessage("ROOT_MENU_AUTHENTICATED_DESCRIPTION").replaceAll("NAME", session.getFirstname() + " " + session.getLastname()));

} else if (session.getAvatarName() != null){
menu.setDescription(getMessage("ROOT_MENU_AUTHENTICATED_DESCRIPTION").replaceAll("NAME", session.getAvatarName()));

} else if (session.getCitizenId() != null) {
menu.setDescription(getMessage("ROOT_MENU_AUTHENTICATED_DESCRIPTION").replaceAll("NAME", session.getCitizenId()));

} else {
menu.setDescription(getMessage("ROOT_MENU_AUTHENTICATED_DESCRIPTION").replaceAll("NAME", ""));

}

options.add(ContextualMenuItem.build(CMD_ROOT_MENU_OPTION1, ROOT_MENU_OPTION1, null));
options.add(ContextualMenuItem.build(CMD_ROOT_MENU_LOGOUT, this.getMessage("ROOT_MENU_LOGOUT"), null));
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -8,8 +8,11 @@ io.twentysixty.demos.auth.language=en
io.twentysixty.demos.auth.messages.welcome=Welcome to the Auth demo service! By using this demo service you'll understand how to authenticate a user by requesting an identity credential, and by demonstrating that the mobile phone user is the same person that the one in the presented credential.
io.twentysixty.demos.auth.messages.root.menu.title=Auth demo service
io.twentysixty.demos.auth.messages.root.menu.option1=Request Support
io.twentysixty.demos.auth.messages.root.menu.no_cred=Get your Identity Card
io.twentysixty.demos.auth.messages.option1=You selected option1 in contextual menu
io.twentysixty.demos.auth.messages.nocred=If you do not have a GaiaID Identity Card (required to authenticate yourself), get one by connecting to below service.
io.twentysixty.demos.auth.messages.auth_success=You're Authenticated.


%dev.io.twentysixty.demos.auth.vision.redirdomain=p2604.ovpndev.2060.io
%dev.io.twentysixty.demos.auth.vision.redirdomain.q=p2603.ovpndev.2060.io
@@ -22,6 +25,7 @@ io.twentysixty.demos.auth.credential_issuer=did:web:registry.demos.dev.2060.io
io.twentysixty.demos.auth.credential_issuer.avatar=https://q.registry.demos.dev.2060.io/gaia.png
io.twentysixty.demos.auth.id_credential_def=did:web:registry.demos.dev.2060.io?service=anoncreds&relativeRef=/credDef/7QxmjvXdW2Z4tg1cZ5aSwtvBukasoH5MGn5Dx73wpmeh

io.twentysixty.demos.auth.request.citizenId=false
io.twentysixty.demos.auth.request.firstname=true
io.twentysixty.demos.auth.request.lastname=true
io.twentysixty.demos.auth.request.photo=true
Loading
Oops, something went wrong.