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

feat(authentication-service): add oauth-code read and write providers #154

Merged
merged 13 commits into from
Mar 31, 2021

Conversation

akshatdubeysf
Copy link
Contributor

Description

Added providers to allow processing the code from Keycloak/Google authentications. Also removed username from subject of jwt tokens, and url of auth-redirects.

Type of change

  • New feature (non-breaking change which adds functionality)

Checklist:

  • Performed a self-review of my own code
  • Code conforms with the style guide


### Providers

You can find documentation for some of the providers bindings this service provides [here](./src/providers/README.md)
Copy link
Contributor

Choose a reason for hiding this comment

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

You can find documentation for some of the providers available in this service [here]

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

});
response.redirect(
`${client.redirectUrl}?code=${token}&user=${this.user.username}`,
const token = await keycloackCodeWriter(
Copy link
Contributor

Choose a reason for hiding this comment

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

lets only keep one code writer provider. no need of separate for keycloak or google.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@@ -9,112 +9,169 @@ A [provider](http://loopback.io/doc/en/lb4/Creating-components.html#providers)
is a class that provides a `value()` function. This function is called `Context`
when another entity requests a value to be injected.

Here we create a provider for a logging function that can be used as a new
action in a custom [sequence](http://loopback.io/doc/en/lb4/Sequence.html).
## Basic Usage
Copy link
Contributor

Choose a reason for hiding this comment

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

Mention that all these are optional.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@sonarcloud
Copy link

sonarcloud bot commented Mar 31, 2021

Kudos, SonarCloud Quality Gate passed!

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

No Coverage information No Coverage information
0.0% 0.0% Duplication

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

Successfully merging this pull request may close these issues.

2 participants