-
Notifications
You must be signed in to change notification settings - Fork 262
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
Conversation
private void setClaims(Attributes claims) throws RealmUnavailableException { | ||
this.claims = claims; | ||
} | ||
|
||
private Attributes getClaims() throws RealmUnavailableException { | ||
if (this.claims == null) { | ||
this.claims = validateToken(this.evidence); |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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);
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fjuma Fixed. Thank you
https://issues.redhat.com/browse/ELY-2104