Skip to content

Commit

Permalink
Update tasks/validate_rbac_token.rb
Browse files Browse the repository at this point in the history
Co-authored-by: Neil Anderson <[email protected]>
  • Loading branch information
jhbuchanan45 and ragingra authored Oct 14, 2024
1 parent c13c900 commit 43bd9ab
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tasks/validate_rbac_token.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@ def execute!
body = JSON.parse(resp.body)
case resp.code
when '401', '403'
puts "#{resp.code} #{body['kind']}: \nCheck your API token at #{token_file}. \
An alternate token file can be specified using the token_file param. \n\n\
See https://www.puppet.com/docs/pe/latest/rbac_token_auth_intro for more details. \n"
puts "#{resp.code} #{body['kind']}: " \
"Check your API token at #{token_file}.\n" \
"Please refresh your token or provide an alternate file.\n" \
"See https://www.puppet.com/docs/pe/latest/rbac_token_auth_intro for more details.\n"
else
puts "Error validating token: #{resp.code} #{body['kind']}"
puts body['msg']
Expand Down

0 comments on commit 43bd9ab

Please sign in to comment.