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-auth-server): OAuth 2.0 Step-up - added acr and auth_time to introspection response #2589 #3885

Merged
merged 1 commit into from
Feb 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,10 @@ public class IntrospectionResponse {
private String issuer;
@JsonProperty(value = "jti")
private String jti;
@JsonProperty(value = "acr_values")
private String acrValues;
@JsonProperty(value = "acr")
private String acr;
@JsonProperty(value = "auth_time")
private Integer authTime;

// DPoP
@JsonProperty(value = "nbf")
Expand All @@ -69,12 +71,20 @@ public IntrospectionResponse(boolean active) {
this.active = active;
}

public String getAcrValues() {
return acrValues;
public String getAcr() {
return acr;
}

public void setAcrValues(String acrValues) {
this.acrValues = acrValues;
public void setAcr(String acr) {
this.acr = acr;
}

public Integer getAuthTime() {
return authTime;
}

public void setAuthTime(Integer authTime) {
this.authTime = authTime;
}

public boolean isActive() {
Expand Down Expand Up @@ -195,7 +205,8 @@ public String toString() {
", audience='" + audience + '\'' +
", issuer='" + issuer + '\'' +
", jti='" + jti + '\'' +
", acrValues='" + acrValues + '\'' +
", acr='" + acr + '\'' +
", authTime='" + authTime + '\'' +
'}';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -206,13 +206,14 @@ private AbstractToken fillResponse(String token, IntrospectionResponse response,
response.setActive(tokenToIntrospect.isValid());
response.setExpiresAt(ServerUtil.dateToSeconds(tokenToIntrospect.getExpirationDate()));
response.setIssuedAt(ServerUtil.dateToSeconds(tokenToIntrospect.getCreationDate()));
response.setAcrValues(grantOfIntrospectionToken.getAcrValues());
response.setAcr(grantOfIntrospectionToken.getAcrValues());
response.setScope(grantOfIntrospectionToken.getScopes() != null ? grantOfIntrospectionToken.getScopes() : Lists.newArrayList()); // #433
response.setClientId(grantOfIntrospectionToken.getClientId());
response.setSub(grantOfIntrospectionToken.getSub());
response.setUsername(grantOfIntrospectionToken.getUserId());
response.setIssuer(appConfiguration.getIssuer());
response.setAudience(grantOfIntrospectionToken.getClientId());
response.setAuthTime(ServerUtil.dateToSeconds(grantOfIntrospectionToken.getAuthenticationTime()));

if (tokenToIntrospect instanceof AccessToken) {
AccessToken accessToken = (AccessToken) tokenToIntrospect;
Expand Down