Skip to content

Commit

Permalink
Trim the cluster identifier
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Liang <[email protected]>
  • Loading branch information
RyanL1997 committed Jun 28, 2023
1 parent 69cbf9d commit 49e63e9
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ public void accept(RestChannel channel) throws Exception {
}

final String clusterIdentifier = clusterService.getClusterName().toString();
final String trimmedClusterIdentifier = clusterIdentifier.substring(clusterIdentifier.indexOf("[") + 1, clusterIdentifier.indexOf("]"));
ß
final Map<String, Object> requestBody = request.contentOrSourceParamParser().map();
final String reason = (String)requestBody.getOrDefault("reason", null);

Expand All @@ -127,7 +129,7 @@ public void accept(RestChannel channel) throws Exception {
builder.field("user", user.getName());

final String token = vendor.createJwt(
clusterIdentifier,
trimmedClusterIdentifier,
user.getName(),
source,
tokenDuration,
Expand Down

0 comments on commit 49e63e9

Please sign in to comment.