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

[ELY-2104] two calls to introspection endpoint for one request with JWT #1500

Merged
merged 1 commit into from
Mar 18, 2021

Conversation

Skyllarr
Copy link
Contributor

private void setClaims(Attributes claims) throws RealmUnavailableException {
this.claims = claims;
}

private Attributes getClaims() throws RealmUnavailableException {
if (this.claims == null) {
this.claims = validateToken(this.evidence);
Copy link
Contributor

Choose a reason for hiding this comment

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

Since validateToken now sets the claims value, I think this line can be changed to just validateToken(this.evidence).


return this.claims;
private Attributes getClaims() throws RealmUnavailableException {
return validateToken(this.evidence);
Copy link
Contributor

Choose a reason for hiding this comment

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

We'll still need the if statement here in case this.claims is null, i.e.,

if (this.claims == null) {
    validateToken(this.evidence);
}
return this.claims;

Just meant that the line this.claims = validateToken(this.evidence); could be simplified to just validateToken(this.evidence);.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@fjuma Fixed. Thank you

@fjuma fjuma added the +1 FJ label Mar 15, 2021
@darranl darranl added the +1 DAL label Mar 18, 2021
@darranl darranl merged commit f7085f3 into wildfly-security:1.x Mar 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants