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

⚰️ Ta i bruk wonderwall og @navikt/oasis #609

Merged
merged 1 commit into from
May 29, 2024
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions .github/workflows/deploy_commit_to_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ jobs:
run: export TZ=utc
- name: Install dependencies
run: npm ci --ignore-scripts
env:
NPM_AUTH_TOKEN: ${{ secrets.READER_TOKEN }}
- name: Get jest cache directory
run: |
jest_command=node_modules/jest-cli/bin/jest.js # fordi å installere jest med npx tar ti sekunder
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ jobs:
run: export TZ=utc
- name: Install dependencies
run: npm ci --ignore-scripts
env:
NPM_AUTH_TOKEN: ${{ secrets.READER_TOKEN }}
- name: Get jest cache directory
run: |
jest_command=node_modules/jest-cli/bin/jest.js # fordi å installere jest med npx tar ti sekunder
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/pull-requests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ jobs:
cache-dependency-path: 'package-lock.json'
- name: install dependencies
run: npm ci --ignore-scripts
env:
NPM_AUTH_TOKEN: ${{ secrets.READER_TOKEN }}
- name: test
run: npm run test
- name: build
Expand Down
3 changes: 3 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
@navikt:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=${NPM_AUTH_TOKEN}

engine-strict=true
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,17 @@ SPESIALIST_WS_URL=ws://127.0.0.1:9001
EOF
```

### Sett opp tilgang til Github Package Registry

For å kunne laste dependencies fra Github Package Registry
må du ha et Github Personal Access satt i miljøvariabelen `NPM_AUTH_TOKEN`.

Dette tokenet trenger scopet `package:read`. Legg til følgende i `~/.bashrc` eller `~/.zshrc`:

```shell
export NPM_AUTH_TOKEN=<token>
```

### Både frontend og backend med én kommando

```shell
Expand Down
5 changes: 5 additions & 0 deletions deploy/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ spec:
generatedConfig:
mountPath: /app/dist/client/nais/nais
azure:
sidecar:
enabled: true
autoLogin: true
autoLoginIgnorePaths:
- /static/*
application:
enabled: true
tenant: nav.no
Expand Down
5 changes: 5 additions & 0 deletions deploy/prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ spec:
generatedConfig:
mountPath: /app/dist/client/nais/nais
azure:
sidecar:
enabled: true
autoLogin: true
autoLoginIgnorePaths:
- /static/*
application:
enabled: true
claims:
Expand Down
406 changes: 110 additions & 296 deletions package-lock.json

Large diffs are not rendered by default.

58 changes: 0 additions & 58 deletions packages/backend/auth/authSupport.test.ts

This file was deleted.

129 changes: 0 additions & 129 deletions packages/backend/auth/authSupport.ts

This file was deleted.

36 changes: 0 additions & 36 deletions packages/backend/auth/azure.ts

This file was deleted.

7 changes: 0 additions & 7 deletions packages/backend/auth/devOnBehalfOf.ts

This file was deleted.

73 changes: 0 additions & 73 deletions packages/backend/auth/onBehalfOf.ts

This file was deleted.

9 changes: 9 additions & 0 deletions packages/backend/auth/testToken.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export const createTokenForTest = () =>
`${Buffer.from(JSON.stringify({ alg: 'HS256', typ: 'JWT' })).toString('base64')}.${Buffer.from(
JSON.stringify({
name: 'S. A. Ksbehandler',
email: 'dev@nav.no',
NAVident: 'dev-ident',
oid: '4577332e-801a-4c13-8a71-39f12b8abfa3',
}),
).toString('base64')}.bogussignature`;
Loading
Loading