Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
gkostin1966 committed May 3, 2024
1 parent 5b355b8 commit b0cd37d
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion apache/client/src/lauth/api_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace mlibrary::lauth {
{"user", req.user}
};

std::string authorization = "Bearer " + bearerToken
std::string authorization = "Bearer " + bearerToken;

HttpHeaders headers {
{"Authorization", authorization}
Expand Down
2 changes: 1 addition & 1 deletion lauth/spec/requests/authorized_any_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
# @param ip [String]
# @return [Hash] the response body after json parsing
def request(from:, as:)
get "/authorized", {user: as.to_s, uri: "/restricted-by-username-or-client-ip", ip: from}, {"Authorization" => "Bearer Token"}
get "/authorized", {user: as.to_s, uri: "/restricted-by-username-or-client-ip", ip: from}, {"Authorization" => "Bearer VGhlIEhvYmJpdAo="}
JSON.parse(last_response.body, symbolize_names: true)
end
end
2 changes: 1 addition & 1 deletion lauth/spec/requests/authorized_client_ip_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def create_network(access, cidr)
# @param ip [String]
# @return [Hash] the response body after json parsing
def request_from(ip)
get "/authorized", {user: "", uri: "/restricted-by-client-ip", ip: ip}, {"Authorization" => "Bearer Token"}
get "/authorized", {user: "", uri: "/restricted-by-client-ip", ip: ip}, {"Authorization" => "Bearer VGhlIEhvYmJpdAo="}
JSON.parse(last_response.body, symbolize_names: true)
end
end
4 changes: 2 additions & 2 deletions lauth/spec/requests/authorized_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
let!(:grant) { Factory[:grant, :for_user, user: user, collection: collection] }

it do
get "/authorized", {user: "lauth-allowed", uri: "/restricted-by-username/"}, {"Authorization" => "Bearer Token"}
get "/authorized", {user: "lauth-allowed", uri: "/restricted-by-username/"}, {"Authorization" => "Bearer VGhlIEhvYmJpdAo="}
body = JSON.parse(last_response.body, symbolize_names: true)

expect(body).to include(determination: "allowed")
Expand All @@ -33,7 +33,7 @@
let!(:grant) { Factory[:grant, :for_group, group: group, collection: collection] }

it do
get "/authorized", {user: "lauth-group-member", uri: "/restricted-by-username/"}, {"Authorization" => "Bearer Token"}
get "/authorized", {user: "lauth-group-member", uri: "/restricted-by-username/"}, {"Authorization" => "Bearer VGhlIEhvYmJpdAo="}

body = JSON.parse(last_response.body, symbolize_names: true)
expect(body).to include(determination: "allowed")
Expand Down
2 changes: 1 addition & 1 deletion lauth/spec/requests/delegated_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def setup_coll(name, has_grant:, pub:)

# @return [Hash] the response body after json parsing
def request(as:)
get "/authorized", {user: as.to_s, uri: "/delegated"}, {"Authorization" => "Bearer Token"}
get "/authorized", {user: as.to_s, uri: "/delegated"}, {"Authorization" => "Bearer VGhlIEhvYmJpdAo="}
JSON.parse(last_response.body, symbolize_names: true)
end
end

0 comments on commit b0cd37d

Please sign in to comment.