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

fix(jans-auth-server): avoid NPE if UpdateToken script returned False #7342

Closed
yuriyz opened this issue Jan 11, 2024 · 1 comment · Fixed by #7411
Closed

fix(jans-auth-server): avoid NPE if UpdateToken script returned False #7342

yuriyz opened this issue Jan 11, 2024 · 1 comment · Fixed by #7411
Assignees
Labels
comp-jans-auth-server Component affected by issue or PR kind-bug Issue or PR is a bug in existing functionality kind-enhancement Issue or PR is an enhancement to an existing functionality kind-feature Issue or PR is a new feature request
Milestone

Comments

@yuriyz
Copy link
Contributor

yuriyz commented Jan 11, 2024

Description

If UpdateToken script returned False AT is not created which is correct but we see also NPE in logs. We should avoid NPE and process it cleanly.

 java.lang.NullPointerException: Cannot invoke "io.jans.as.server.model.common.AccessToken.getTokenType()" because "accessToken" is null
	at io.jans.as.server.token.ws.rs.TokenRestWebServiceImpl.processClientGredentials(TokenRestWebServiceImpl.java:314) ~[classes/:?]
	at io.jans.as.server.token.ws.rs.TokenRestWebServiceImpl.requestAccessToken(TokenRestWebServiceImpl.java:201) ~[classes/:?]
	at io.jans.as.server.token.ws.rs.TokenRestWebServiceImpl$Proxy$_$$_WeldClientProxy.requestAccessToken(Unknown Source) ~[classes/:?]
@yuriyz yuriyz added kind-enhancement Issue or PR is an enhancement to an existing functionality comp-jans-auth-server Component affected by issue or PR labels Jan 11, 2024
@yuriyz yuriyz added this to the 1.0.22 milestone Jan 11, 2024
@yuriyz yuriyz self-assigned this Jan 11, 2024
@yuriyz
Copy link
Contributor Author

yuriyz commented Jan 11, 2024

Also processClientGredentials has typo it must be processClientCredentials

@mo-auto mo-auto added the kind-feature Issue or PR is a new feature request label Jan 11, 2024
@yuriyz yuriyz changed the title feat(jans-auth-server): avoid NPE if UpdateToken script returned False fix(jans-auth-server): avoid NPE if UpdateToken script returned False Jan 18, 2024
@mo-auto mo-auto added the kind-bug Issue or PR is a bug in existing functionality label Jan 18, 2024
yuriyz added a commit that referenced this issue Jan 18, 2024
moabu added a commit that referenced this issue Jan 18, 2024
…7342 (#7411)

Signed-off-by: YuriyZ <yzabrovarniy@gmail.com>
Co-authored-by: Mohammad Abudayyeh <47318409+moabu@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp-jans-auth-server Component affected by issue or PR kind-bug Issue or PR is a bug in existing functionality kind-enhancement Issue or PR is an enhancement to an existing functionality kind-feature Issue or PR is a new feature request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants