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(jans-config-api): user-management endpoints #1167

Merged
merged 18 commits into from
Apr 6, 2022
Merged

Conversation

pujavs
Copy link
Contributor

@pujavs pujavs commented Apr 5, 2022

@yuriyz request you to pls review and approve new endpoints for user management
Related issue 418

Endpoint: /jans-config-api/api/v1/user

Impacted modules:

1) jans-config-api: Endpoint related classes and swagger spec
2)jans-cli: endpoint spec changes

@sonarcloud
Copy link

sonarcloud bot commented Apr 5, 2022

[jans-cli] Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

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

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link
Contributor

@yuriyz yuriyz left a comment

Choose a reason for hiding this comment

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

Some minor changes are needed, please check comments.


@POST
@ProtectedApi(scopes = { ApiAccessConstants.USER_WRITE_ACCESS })
public Response createOpenIdConnect(@Valid User user) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure what does method name mean createOpenIdConnect, sounds like typo. createUser fits better.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, rectified the same


@GET
@ProtectedApi(scopes = { ApiAccessConstants.USER_READ_ACCESS })
public Response getOpenIdConnectClients(
Copy link
Contributor

Choose a reason for hiding this comment

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

It's not openid clients, we are returning users. searchUsers or getUsers

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, rectified the same

@QueryParam(value = ApiConstants.SORT_BY) String sortBy,
@QueryParam(value = ApiConstants.SORT_ORDER) String sortOrder) {
if (logger.isDebugEnabled()) {
logger.debug("User serach param - limit:{}, pattern:{}, startIndex:{}, sortBy:{}, sortOrder:{}",
Copy link
Contributor

Choose a reason for hiding this comment

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

Typo, serach -> search

Copy link
Contributor Author

Choose a reason for hiding this comment

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

rectified


@ApplicationScoped
@Named("userSrv")
public class UsrService extends UserService {
Copy link
Contributor

Choose a reason for hiding this comment

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

public class UserService extends io.jans.as.common.service.common.UserService will work too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it was public class UserService extends io.jans.as.common.service.common.UserService but when analyzed it locally it was giving sonar issue to change the name and hence i changed it to UsrService.
Will check in as suggested and lets see

Copy link
Contributor

Choose a reason for hiding this comment

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

I see, let it be then.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Strangely it is giving error locally but not reported by Github sonar check
image

@sonarcloud
Copy link

sonarcloud bot commented Apr 6, 2022

[jans-linux-setup] Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

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

No Coverage information No Coverage information
No Duplication information No Duplication information

@sonarcloud
Copy link

sonarcloud bot commented Apr 6, 2022

[Fido2 API] Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

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

No Coverage information No Coverage information
No Duplication information No Duplication information

@sonarcloud
Copy link

sonarcloud bot commented Apr 6, 2022

[Jans authentication server parent] Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

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

No Coverage information No Coverage information
No Duplication information No Duplication information

@pujavs pujavs requested a review from yuriyz April 6, 2022 09:04
yuriyz
yuriyz previously approved these changes Apr 6, 2022
@sonarcloud
Copy link

sonarcloud bot commented Apr 6, 2022

[jans-config-api-parent] Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

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

0.0% 0.0% Coverage
5.1% 5.1% Duplication

@moabu moabu changed the title feat(jans-config-api): user management endpoints feat(jans-config-api): user-management endpoints Apr 6, 2022
@pujavs pujavs requested a review from yuriyz April 6, 2022 16:39
@yuriyz yuriyz merged commit d8e97c4 into main Apr 6, 2022
@yuriyz yuriyz deleted the jans-config-api-418 branch April 6, 2022 17:05
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.

3 participants