Skip to content

Commit

Permalink
fix: fcli ssc token update: Improve usage message (fixes #177)
Browse files Browse the repository at this point in the history
  • Loading branch information
rsenden committed Dec 14, 2022
1 parent 216ac2a commit 8e8b924
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
public class SSCTokenUpdateCommand extends AbstractSSCTokenCommand {
private static final DateTimePeriodHelper PERIOD_HELPER = DateTimePeriodHelper.byRange(Period.MINUTES, Period.DAYS);
@Getter @Mixin private BasicOutputHelperMixins.Update outputHelper;
@Parameters(arity="1") private String token;
@Parameters(arity="1", paramLabel = "token-id", descriptionKey = "fcli.ssc.token.update.token-id") private String tokenId;
@Option(names="--expire-in") private String expireIn;
@Option(names="--description") private String description;

Expand All @@ -57,7 +57,7 @@ protected JsonNode getJsonNode(SSCTokenHelper tokenHelper, IUrlConfig urlConfig,
.terminalDate(getExpiresAt())
.description(description)
.build();
return tokenHelper.updateToken(urlConfig, userCredentialsConfig, token, tokenUpdateRequest);
return tokenHelper.updateToken(urlConfig, userCredentialsConfig, tokenId, tokenUpdateRequest);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ fcli.ssc.token.create.description = Token description
fcli.ssc.token.list.usage.header = List tokens
fcli.ssc.token.revoke.usage.header = Revoke a token
fcli.ssc.token.update.usage.header = Update a token
fcli.ssc.token.update.token-id = Token id as shown by token create and list commands. Note that this command does not accept the actual token value.
fcli.ssc.token.update.expire-in = Update token expiration period, specified as 30m (30 minutes), 2h (2 hours), 1d (1 day)
fcli.ssc.token.update.description = Update token description

Expand Down

0 comments on commit 8e8b924

Please sign in to comment.