bcgov / nr-frontend-starting-app

This repository holds a simple Web app using React, to get team started with integrations, authentication and deeployments.
Apache License 2.0
3 stars 1 forks source link

feat: add authentication and roles bases authorization #24

Closed RMCampos closed 1 year ago

RMCampos commented 2 years ago

Description

Create authorization and authentication handlers for requests using JWT and SSO integration.

Fixes FSADT2-172

Type of change

How Has This Been Tested?

This feature was tested locally and will be tested after opening the Pull Request.

Checklist

Further comments

github-actions[bot] commented 2 years ago

Current changelog

Features

github-actions[bot] commented 2 years ago

DEV deployments have completed successfully! Frontend: [https://nrfesampleapp-24-app.apps.silver.devops.gov.bc.ca/]()

sonarcloud[bot] commented 1 year ago

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

42.5% 42.5% Coverage
0.0% 0.0% Duplication

github-actions[bot] commented 1 year ago

Coverage report

Coverage after merging feat/roles-and-auth into main will be
38.85%
Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   App.tsx81.82%100%33.33%89.47%26, 29
   keycloak.ts75%50%100%100%3–5
src/components/BCHeader
   index.tsx91.30%100%75%93.75%42
src/components/LoadingButton
   index.tsx40%25%25%45.45%37–38, 40, 40, 40–42, 44–45, 50–53, 60, 70
src/components/UserTable
   index.tsx85%50%75%92.86%53, 57
src/layout/PublicLayout
   index.tsx100%100%100%100%
src/service
   AuthService.ts46.05%25%27.27%63.41%24–25, 25, 42–43, 43, 43, 46, 46, 49–50, 50, 50, 54–55, 55, 55, 59–60, 60, 60, 64–65, 65, 65, 69–70, 70, 70, 74–75, 75, 75
   FetchApi.ts3.57%0%0%6.25%14–16, 16, 16, 16–17, 20, 20–21, 24, 24–25, 33, 50–51, 53, 53–54, 56, 59, 62
   GetExceptionResponse.ts11.11%0%0%14.29%11, 11–14, 16, 23
src/types
   LoginProviders.ts100%100%100%100%
src/views/Form
   index.tsx6.78%0%0%9.30%100–104, 106, 106–108, 108, 108–110, 115, 115–117, 127–129, 134–135, 137, 141–142, 147–148, 150, 156–159, 161–162, 166–168, 173–175, 177–178, 182–183, 186–188, 188, 188–189, 194–195, 195, 195–196, 201, 203, 208, 212–213, 216–218, 218, 218–219, 224–225, 225, 225–226, 231, 233, 238, 242–243, 245, 245, 245, 245, 245, 245, 245, 247–248, 248, 248, 248, 248–250, 250, 250, 250–251, 254–255, 257, 257–258, 260, 263–265, 268–270, 270–271, 271–272, 277, 293, 293, 306, 306, 322, 33–34, 340, 36, 38–40, 46–48, 56, 58–59, 61, 63–64, 66, 68–69, 75–78, 83, 85–86, 91, 93–97
src/views/Home
   index.tsx20.51%0%0%36.36%106, 106, 120, 120, 17–18, 20–21, 21–22, 22–23, 28–29, 32–33, 36–38, 40, 64, 64, 74, 74
src/views/Landing
   index.tsx43.24%0%28.57%51.85%19–20, 20–21, 24–25, 25–27, 33–35, 39–40, 61, 69
src/views/LoginSuccess
   index.tsx25%0%0%33.33%12–13, 13–14, 18, 5, 7–9
src/views/StartLogin
   index.tsx13.51%0%0%18.52%10, 10, 10, 12, 17, 20–24, 24–25, 28, 28–29, 32, 35–38, 41–42, 42–43, 47, 7, 9
src/views/Table
   index.tsx31.25%0%0%41.67%10, 10–11, 11–12, 17, 6–7, 9
RMCampos commented 1 year ago

Closing this PR, since a new one is in place: https://github.com/bcgov/nr-frontend-starting-app/pull/28