| 1 | package Protocol::DBus::X::Rejected; | ||
| 2 | |||
| 3 | use strict; | ||
| 4 | use warnings; | ||
| 5 | |||
| 6 | use parent qw( Protocol::DBus::X::Base ); | ||
| 7 | |||
| 8 | sub _new { | ||
| 9 | my ($class, @mechs) = @_; | ||
| 10 | |||
| 11 | my $msg = 'Authentication rejected.'; | ||
| 12 | |||
| 13 | if (@mechs) { | ||
| 14 | $msg .= " Try: @mechs"; | ||
| 15 | } | ||
| 16 | |||
| 17 | return $class->SUPER::_new( | ||
| 18 | $msg, | ||
| 19 | mechanisms => \@mechs, | ||
| 20 | ); | ||
| 21 | } | ||
| 22 | |||
| 23 | 1; |