Skip to content

Commit

Permalink
React example
Browse files Browse the repository at this point in the history
  • Loading branch information
JZO001 committed Oct 29, 2022
1 parent 32bd426 commit c857d9e
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 15 deletions.
14 changes: 10 additions & 4 deletions Forge.Yoda.Apps.Web.React/ClientApp/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Forge.Yoda.Apps.Web.React/ClientApp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"bootstrap": "^5.2.2",
"devextreme": "^22.1.6",
"devextreme-react": "^22.1.6",
"forge-security-jwt-client-web": "1.0.3",
"forge-security-jwt-client-web": "1.0.6",
"forge-security-jwt-client-web-react": "1.0.2",
"jquery": "^3.6.1",
"jzo-library": "1.0.6",
"http-proxy-middleware": "^2.0.6",
Expand Down
2 changes: 1 addition & 1 deletion Forge.Yoda.Apps.Web.React/ClientApp/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'devextreme/dist/css/dx.common.css';
import 'devextreme/dist/css/dx.light.css';
import { Configuration, Options, ServiceStore } from 'forge-security-jwt-client-web';
import AuthorizeView from 'forge-security-jwt-client-web/build/tsx/AuthorizeView';
import { AuthorizeView } from 'forge-security-jwt-client-web-react';
import { Guid } from 'jzo-library';

import * as React from 'react';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@ import { Link } from 'react-router-dom';
import { Navigate } from 'react-router';

import LoadingPopup from "./LoadingPopup";
import { ServiceStore } from "../../security/services/ServiceStore";
import { UserContext } from "./UserContext";
import Authorized from "../Authorized";
import NotAuthorized from "../NotAuthorized";
import { EventArgs } from "jzo-library";
import { ServiceStore } from "forge-security-jwt-client-web";
import { Authorized, NotAuthorized } from "forge-security-jwt-client-web-react";

type AccountMenuState = {
isErrorPopupVisible: boolean,
Expand Down
3 changes: 1 addition & 2 deletions Forge.Yoda.Apps.Web.React/ClientApp/src/components/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ import LoadingPopup from "./LoadingPopup";
import { ClickEventArgs, ValueChangedEventArgs } from "./DxTypes";
import dxTextBox from "devextreme/ui/text_box";
import dxButton from "devextreme/ui/button";
import { ServiceStore } from "../../security/services/ServiceStore";
import { JwtTokenResult } from "../../security/data/types";
import { JwtTokenResult, ServiceStore } from "forge-security-jwt-client-web";

type LoginState = {
loginName: string,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import { Claim, ClaimTypes, IAuthenticationService, ParsedTokenData, UserDataEventArgs } from "forge-security-jwt-client-web";
import { EventArgs, GenericEvent } from "jzo-library";
import { ClaimTypes } from "../../security/data/ClaimTypes";
import { Claim, ParsedTokenData } from "../../security/data/types";
import { UserDataEventArgs } from "../../security/data/UserDataEventArgs";
import { IAuthenticationService } from "../../security/interfaces/IAuthenticationService";

export class UserContext {

Expand Down
12 changes: 12 additions & 0 deletions Forge.Yoda.Shared.ServiceImpls/Properties/launchSettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"profiles": {
"Forge.Yoda.Shared.ServiceImpls": {
"commandName": "Project",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "https://localhost:63214;http://localhost:63215"
}
}
}

0 comments on commit c857d9e

Please sign in to comment.