diff options
| author | mokha <mokha@cisco.com> | 2018-03-06 15:08:58 -0700 |
|---|---|---|
| committer | mokha <mokha@cisco.com> | 2018-03-06 15:08:58 -0700 |
| commit | a36ab57e6026924d9843578b50254156b36260ee (patch) | |
| tree | 077e5a5f4b7b27fbb6576253b17ef1a4608dd4f2 | |
| parent | 2b70516d97189c71a5e860277197d5bad4d1c7d2 (diff) | |
render error if the document is invalid.
| -rw-r--r-- | lib/saml/kit/cli/report.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/saml/kit/cli/report.rb b/lib/saml/kit/cli/report.rb index 947bf9f..d60da0c 100644 --- a/lib/saml/kit/cli/report.rb +++ b/lib/saml/kit/cli/report.rb @@ -9,7 +9,11 @@ module Saml end def print(shell) - shell.say_status :success, "Decoded #{document.send(:name)}" + if document.is_a?(Saml::Kit::InvalidDocument) + shell.say_status :error, "Decoded #{document.send(:name)}" + else + shell.say_status :success, "Decoded #{document.send(:name)}" + end shell.print_table build_table_for(document) signature = document.signature if signature.present? && signature.certificate.present? |
