Skip to content

Commit

Permalink
fixes #11 client_id and user_id are not populated when auditInfo is n…
Browse files Browse the repository at this point in the history
…ot null
  • Loading branch information
stevehu committed Jun 14, 2017
1 parent 37c256e commit e423ced
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ public class SwaggerOperation {
private final Path pathObject;
private final HttpMethod method;
private final Operation operation;
private String endpoint;
private String clientId;

public SwaggerOperation(final NormalisedPath pathString, final Path pathObject,
final HttpMethod method, final Operation operation) {
Expand Down Expand Up @@ -75,19 +73,4 @@ public Operation getOperation() {
return operation;
}

public String getEndpoint() {
return endpoint;
}

public void setEndpoint(String endpoint) {
this.endpoint = endpoint;
}

public String getClientId() {
return clientId;
}

public void setClientId(String clientId) {
this.clientId = clientId;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@ public void handleRequest(final HttpServerExchange exchange) throws Exception {
// endpoint and swaggerOperation available. This handler will enrich the auditInfo.
if(auditInfo == null) {
auditInfo = new HashMap<>();
auditInfo.put(Constants.CLIENT_ID, claims.getStringClaimValue(Constants.CLIENT_ID));
auditInfo.put(Constants.USER_ID, claims.getStringClaimValue(Constants.USER_ID));
exchange.putAttachment(AuditHandler.AUDIT_INFO, auditInfo);
}
auditInfo.put(Constants.CLIENT_ID, claims.getStringClaimValue(Constants.CLIENT_ID));
auditInfo.put(Constants.USER_ID, claims.getStringClaimValue(Constants.USER_ID));
if(config != null && (Boolean)config.get(ENABLE_VERIFY_SCOPE) && SwaggerHelper.swagger != null) {
Operation operation = null;
SwaggerOperation swaggerOperation = (SwaggerOperation)auditInfo.get(Constants.SWAGGER_OPERATION);
Expand Down

0 comments on commit e423ced

Please sign in to comment.