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

add vue oauth2 keycloak module #10928

Open
wants to merge 21 commits into
base: main
Choose a base branch
from

Conversation

renanfranca
Copy link
Contributor

@renanfranca renanfranca commented Sep 20, 2024

Fix #1133

image

TO-DO:

  • Add the vue auth module files to be ignored by code coverage tests because it doesn’t have tests. (waiting to the result of the discussion: Code coverage 100% for front end generated apps)

    • Add to tests-ci/generate.sh this new module at vueapp
  • Add keycloak-js dependency to common package.json

    • Added "keycloak-js": "25.0.5" to the dependencies in the common package.json file
  • Add tests for the VueOAuth2KeycloakModulesFactory

    • Created VueOAuth2KeycloakModulesFactoryTest.java
    • Implemented tests to verify the correct building of the Vue OAuth2 Keycloak module
    • Checked for proper file creation and content in the generated module
  • Add template files to be used by vue-oauth2-keycloak module

    • Created AuthProvider.ts.mustache
    • Created AuthRepository.ts.mustache
    • Created AuthenticatedUser.ts.mustache
    • Created KeycloakAuthRepository.ts.mustache
    • Created KeycloakHttp.ts.mustache
    • These files provide the core functionality for OAuth2 authentication with Keycloak in a Vue application
  • Remove unused import added to main.ts

    • Removed the unused 'axios' import from the main.ts file in VueOAuth2KeycloakModulesFactory.java
  • Add package-info.java

    • Added package-info.java to the vue.security.oauth2_keycloak package
    • Applied @tech.jhipster.lite.BusinessContext annotation to the package
  • Add vue-oauth2-keycloak module configuration

    • Created VueOAuth2KeycloakApplicationService.java
    • Implemented VueOAuth2KeycloakModuleConfiguration.java
    • Added VUE_OAUTH2_KEYCLOAK to JHLiteModuleSlug enum
  • Add cucumber test to vue-oauth2-keycloak module configuration

    • Created vue-oauth2-keycloak.feature file
    • Implemented scenario to test the application of Vue OAuth2 Keycloak module
  • Fix cucumber test

    • Updated vue-oauth2-keycloak.feature
    • Added 'typescript' module to the list of applied modules in the test scenario
  • Improve VueOAuth2KeycloakModulesFactory code by using constants

    • Refactored VueOAuth2KeycloakModulesFactory.java
    • Introduced constants for repeated string literals
    • Improved code readability and maintainability
  • Use keycloak-js dependency from COMMON package instead of the ANGULAR package

    • Updated AngularOauth2ModuleFactory.java
    • Changed the source of keycloak-js dependency from ANGULAR to COMMON
    • Removed keycloak-js entry from angular/package.json
  • Add vue-authentication-components.md documentation to vue-oauth2-keycloak module

    • Created vue-authentication-components.md
    • Provided detailed documentation on the Vue authentication components
    • Included file structure, detailed file explanations, and usage instructions
  • Fix sonar issues at KeycloakHttp.ts.mustache

    • Updated KeycloakHttp.ts.mustache
    • Replaced || with ?? for null coalescing
    • Improved code quality and addressed potential issues flagged by SonarQube

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Vue: add OAuth2 keycloak authentication
3 participants