diff --git a/KeriAuth.BrowserExtension/UI/Layouts/MainLayout.razor b/KeriAuth.BrowserExtension/UI/Layouts/MainLayout.razor index 8af1ed8..59ab979 100644 --- a/KeriAuth.BrowserExtension/UI/Layouts/MainLayout.razor +++ b/KeriAuth.BrowserExtension/UI/Layouts/MainLayout.razor @@ -42,7 +42,7 @@ Icon - KERI Auth + KeriAuth diff --git a/KeriAuth.BrowserExtension/UI/Pages/RequestSignInPage.razor b/KeriAuth.BrowserExtension/UI/Pages/RequestSignInPage.razor index 7c84690..1e74602 100644 --- a/KeriAuth.BrowserExtension/UI/Pages/RequestSignInPage.razor +++ b/KeriAuth.BrowserExtension/UI/Pages/RequestSignInPage.razor @@ -339,25 +339,33 @@ this.StateHasChanged(); } - /* SignIn() - // TODO parameterize this to include the Identifier AID (or prefix?) or Credential + /* + // SignIn() */ - async Task SignIn() + async Task SignIn(SignInMode RequestedSignInMode, string requestId2, string SelectedPrefix) { - // for Credential - // ReplyMessageData replyMessageData = new( - // "/signify/reply", - // new AuthorizeResult(new AuthorizeResultCredential("rawraw", "hail cesr"), null), new AuthorizeResultIdentifier("selectedPrefix....")), - // requestId: requestId - // ); - - // for Identifier - ReplyMessageData replyMessageData = new( - "/signify/reply", - new AuthorizeResult(null, new AuthorizeResultIdentifier(SelectedPrefix)), - requestId: requestId - ); - + ReplyMessageData replyMessageData; + switch (RequestedSignInMode) + { + case SignInMode.Identifier: + logger.LogInformation("SignIn with Identifier: {0}", SelectedPrefix); + replyMessageData = new( + "/signify/reply", + new AuthorizeResult(null, new AuthorizeResultIdentifier(SelectedPrefix)), + requestId: requestId2 + ); + break; + case SignInMode.Credential: + logger.LogInformation("SignIn with Credential: {0}", "Test from KERI Auth"); + replyMessageData = new( + "/signify/reply", + new AuthorizeResult(new AuthorizeResultCredential("rawraw", "Test from KERI Auth"), null), + requestId: requestId2 + ); + break; + default: + return; + } await appSwMessagingService.SendToServiceWorkerAsync(replyMessageData); UIHelper.CloseWindow(); } @@ -480,7 +488,7 @@ Cancel - Sign In + Sign In @@ -488,5 +496,4 @@ .mud-select .mud-select-input .mud-input-slot { height: auto; } - - + \ No newline at end of file diff --git a/KeriAuth.BrowserExtension/UI/Pages/UnlockPage.razor b/KeriAuth.BrowserExtension/UI/Pages/UnlockPage.razor index f48d061..91b8084 100644 --- a/KeriAuth.BrowserExtension/UI/Pages/UnlockPage.razor +++ b/KeriAuth.BrowserExtension/UI/Pages/UnlockPage.razor @@ -44,8 +44,8 @@
- - KERI Auth + + KeriAuth autonomous and authentic @@ -60,7 +60,7 @@ Unlock - KERI Auth locks after @AppConfig.IdleTimeoutTimeSpanMins minutes of inactivity + KeriAuth locks after @AppConfig.IdleTimeoutTimeSpanMins minutes of inactivity
diff --git a/KeriAuth.BrowserExtension/wwwroot/index.html b/KeriAuth.BrowserExtension/wwwroot/index.html index 08d7a9c..af08e1d 100644 --- a/KeriAuth.BrowserExtension/wwwroot/index.html +++ b/KeriAuth.BrowserExtension/wwwroot/index.html @@ -27,7 +27,7 @@ logo
-

KERI Auth

+

KeriAuth

diff --git a/KeriAuth.BrowserExtension/wwwroot/scripts/esbuild/ContentScript.ts b/KeriAuth.BrowserExtension/wwwroot/scripts/esbuild/ContentScript.ts index 574b534..30b645c 100644 --- a/KeriAuth.BrowserExtension/wwwroot/scripts/esbuild/ContentScript.ts +++ b/KeriAuth.BrowserExtension/wwwroot/scripts/esbuild/ContentScript.ts @@ -158,8 +158,11 @@ function handleWindowMessage(event: MessageEvent, portWithSw: chrome. return; } break; - case CsSwMsgType.SELECT_AUTHORIZE_CREDENTIAL: + case CsSwMsgType.CONFIGURE_VENDOR: + console.warn(`KeriAuthCs from page: ${event.data.type} not yet implemented`); + break; + case CsSwMsgType.SELECT_AUTHORIZE_CREDENTIAL: case CsSwMsgType.SELECT_AUTO_SIGNIN: case CsSwMsgType.VENDOR_INFO: case CsSwMsgType.FETCH_RESOURCE: