Skip to content
This repository has been archived by the owner on Jan 17, 2025. It is now read-only.

Commit

Permalink
Merge pull request #2 from InteropIO/update-readme-files
Browse files Browse the repository at this point in the history
Update the README.md files and add missing information for initial running of the example locally
  • Loading branch information
HristoKolev authored May 27, 2024
2 parents e4bc5b2 + 1d08e7e commit 719badf
Show file tree
Hide file tree
Showing 7 changed files with 27,002 additions and 24,523 deletions.
2 changes: 1 addition & 1 deletion admin-ui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ How to run:
1. Add a .npmrc file with the following content (placeholders can be filled in after setting up JFrog account)
```sh
registry=https://registry.npmjs.org
@glue42:registry=https://glue42.jfrog.io/artifactory/api/npm/default-npm-virtual/
@interopio:registry=https://glue42.jfrog.io/artifactory/api/npm/default-npm-virtual/
//glue42.jfrog.io/artifactory/api/npm/default-npm-virtual/:_auth=<COPY_FROM_JFROG_SETUP>
//glue42.jfrog.io/artifactory/api/npm/default-npm-virtual/:email=<COPY_FROM_JFROG_SETUP>
//glue42.jfrog.io/artifactory/api/npm/default-npm-virtual/:always-auth=true
Expand Down
44,544 changes: 21,315 additions & 23,229 deletions admin-ui/package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion admin-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
},
"scripts": {
"start": "craco start",
"build": "react-scripts build",
"build": "craco build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
Expand Down
3 changes: 3 additions & 0 deletions login/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ npm i
npm run start
```
This will host the app on localhost:9123

2. Use this `email` address to login for the first time (defined in `server/src/data.ts`):
- [email protected]
2 changes: 1 addition & 1 deletion server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ How to run :
1. Add a .npmrc file with the following content (placeholders can be filled in after setting up JFrog account)
```sh
registry=https://registry.npmjs.org
@glue42:registry=https://glue42.jfrog.io/artifactory/api/npm/default-npm-virtual/
@interopio:registry=https://glue42.jfrog.io/artifactory/api/npm/default-npm-virtual/
//glue42.jfrog.io/artifactory/api/npm/default-npm-virtual/:_auth=<COPY_FROM_JFROG_SETUP>
//glue42.jfrog.io/artifactory/api/npm/default-npm-virtual/:email=<COPY_FROM_JFROG_SETUP>
//glue42.jfrog.io/artifactory/api/npm/default-npm-virtual/:always-auth=true
Expand Down
6,968 changes: 5,679 additions & 1,289 deletions server/package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions server/src/authenticator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export class Authenticator implements CustomAuthenticator {
return;
}

const userId = tokenFromRequest?.replace(`user:`, ``);
const userEmail = tokenFromRequest?.replace(`user:`, ``);

// validate the token
if (!this.validateToken(tokenFromRequest)) {
Expand All @@ -36,7 +36,7 @@ export class Authenticator implements CustomAuthenticator {
}

// in this dummy example the token is actually the username, so we to try to find the user based on it
const user = users.find(u => u.id === userId);
const user = users.find(u => u.email === userEmail);
if (!user) {
next({
name: "UnauthorizedError",
Expand Down

0 comments on commit 719badf

Please sign in to comment.