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

Functionality of OAuth2 #58

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

Functionality of OAuth2 #58

wants to merge 10 commits into from

Conversation

harshadk-sourcefuse
Copy link
Contributor

Description

Added OAuth2 Implementation so user can just add Outh2 properties and can integrate the Oauth2 api in auth service

Just Add below properties for enabling the oauth2 for particular provider

## below properties are for google
spring.security.oauth2.client.registration.google.provider=google
spring.security.oauth2.client.registration.google.client-id={Client Id Here}
spring.security.oauth2.client.registration.google.client-secret={Clien Secret Here}
spring.security.oauth2.client.registration.google.scope= email, profile

## below properties are for github
spring.security.oauth2.client.registration.github.provider=github
spring.security.oauth2.client.registration.github.client-id={Client Id Here}
spring.security.oauth2.client.registration.github.client-secret={Client Secret Here}
spring.security.oauth2.client.registration.github.scope= read:user, user:email


## below properties are for leycloak
spring.security.oauth2.client.registration.keycloak.provider=keycloak
spring.security.oauth2.client.registration.keycloak.client-id={Client Id Here}
spring.security.oauth2.client.registration.keycloak.authorization-grant-type=authorization_code
spring.security.oauth2.client.registration.keycloak.scope=openid, email, profile
spring.security.oauth2.client.provider.keycloak.issuer-uri={Issuer URLHere}
spring.security.oauth2.client.provider.keycloak.user-name-attribute=preferred_username

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Intermediate change (work in progress)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A
  • Test B

Checklist:

  • Performed a self-review of my own code
  • npm test passes on your machine
  • New tests added or existing tests modified to cover all changes
  • Code conforms with the style guide
  • [] API Documentation in code was updated
  • Any dependent changes have been merged and published in downstream modules

@harshadk-sourcefuse harshadk-sourcefuse added the enhancement New feature or request label Oct 4, 2023
@harshadk-sourcefuse harshadk-sourcefuse self-assigned this Oct 4, 2023
@harshadk-sourcefuse harshadk-sourcefuse changed the title Oauth2 Function Functionality of OAuth2 Oct 4, 2023
Copy link
Contributor

@AdilSDE AdilSDE left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check below comments , if you find it good to be consider ,you may apply it.

@sonarcloud
Copy link

sonarcloud bot commented Oct 6, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot E 1 Security Hotspot
Code Smell A 2 Code Smells

0.0% 0.0% Coverage
1.7% 1.7% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

Copy link

sonarcloud bot commented May 13, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
4 New issues
1 Security Hotspot
C Reliability Rating on New Code (required ≥ A)
2 New Bugs (required ≤ 0)

See analysis details on SonarCloud

Catch issues before they fail your Quality Gate with our IDE extension SonarLint

Copy link
Contributor

@mlakdawala-sf mlakdawala-sf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sonar issues needs to be revisited, Rest looks good to me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants