Skip to content

Commit

Permalink
#852 : removed scopes field from 4.0.0 version (it was left in earl…
Browse files Browse the repository at this point in the history
…ier versions only for compatibility).

#852
  • Loading branch information
yuriyz committed Jul 16, 2018
1 parent 2b6e345 commit 1e97b74
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@ public class IntrospectionResponse {
@JsonProperty(value = "active")
private boolean active; // according spec, must be "active" http://tools.ietf.org/html/draft-richer-oauth-introspection-03#section-2.2

@Deprecated // remove in 4.0.0, we left it just for compatiblity in 3.x.x versions
@JsonProperty(value = "scopes")
@ApiModelProperty(value = " An array referencing zero or more strings representing scopes to which access was granted for this resource. Each string MUST correspond to a scope that was registered by this resource server for the referenced resource.", required = true)
private List<String> scopes;

@JsonProperty(value = "scope")
@ApiModelProperty(value = " An array referencing zero or more strings representing scopes to which access was granted for this resource. Each string MUST correspond to a scope that was registered by this resource server for the referenced resource.", required = true)
private List<String> scope;
Expand Down Expand Up @@ -86,16 +81,6 @@ public void setActive(boolean p_active) {
active = p_active;
}

@Deprecated // remove in 4.0.0, we left it just for compatiblity in 3.x.x versions
public List<String> getScopes() {
return scopes;
}

@Deprecated // remove in 4.0.0, we left it just for compatiblity in 3.x.x versions
public void setScopes(Collection<String> scopes) {
this.scopes = scopes != null ? new ArrayList<String>(scopes) : new ArrayList<String>();
}

public List<String> getScope() {
return scope;
}
Expand Down Expand Up @@ -180,7 +165,6 @@ public void setJti(String jti) {
public String toString() {
return "IntrospectionResponse{" +
"active=" + active +
", scopes=" + scopes +
", scope=" + scope +
", clientId='" + clientId + '\'' +
", username='" + username + '\'' +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ private Response introspect(String p_authorization, String p_token, String token
response.setExpiresAt(ServerUtil.dateToSeconds(tokenToIntrospect.getExpirationDate()));
response.setIssuedAt(ServerUtil.dateToSeconds(tokenToIntrospect.getCreationDate()));
response.setAcrValues(grantOfIntrospectionToken.getAcrValues());
response.setScopes(grantOfIntrospectionToken.getScopes() != null ? grantOfIntrospectionToken.getScopes() : new ArrayList<String>()); // remove in 4.0.0, we don't need it anymore
response.setScope(grantOfIntrospectionToken.getScopes() != null ? grantOfIntrospectionToken.getScopes() : new ArrayList<String>()); // #433
response.setClientId(grantOfIntrospectionToken.getClientId());
response.setSub(getSub(grantOfIntrospectionToken));
Expand Down

0 comments on commit 1e97b74

Please sign in to comment.