Skip to content

Commit

Permalink
HWKMETRICS-350: update required to function properly with latest buil…
Browse files Browse the repository at this point in the history
…ds from origin master due to api changes.
  • Loading branch information
mwringe committed Feb 9, 2016
1 parent f71fc93 commit 38810c5
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2014-2015 Red Hat, Inc. and/or its affiliates
* Copyright 2014-2016 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -87,6 +87,7 @@ private boolean isAuthorized(String method, String token, String projectId) {
connection.setDoOutput(true);
//Set Headers
connection.setRequestProperty("Accept", "application/json");
connection.setRequestProperty("Content-type", "application/json");
connection.setRequestProperty("Authorization", token);

//Add the body
Expand Down Expand Up @@ -131,6 +132,7 @@ private boolean isAuthorized(String method, String token, String projectId) {
*/
private String generateSubjectAccessReview(String namespace, String verb) throws IOException {
ObjectNode objectNode = JsonNodeFactory.instance.objectNode();
objectNode.put("apiVersion", "v1");
objectNode.put("kind", KIND);
objectNode.put("resource", RESOURCE);
objectNode.put("verb", verb);
Expand Down

0 comments on commit 38810c5

Please sign in to comment.