Changes to Authentication to support Authentication::Store::Htpasswd
[catagits/Catalyst-Plugin-Authentication.git] / lib / Catalyst / Plugin / Authentication / User.pm
index 7c33c98..a008c2f 100644 (file)
@@ -9,7 +9,20 @@ sub id { die "virtual" }
 
 sub store { die "virtual" }
 
-sub supports { die "virtual" }
+sub supports {
+    my ( $self, @spec ) = @_;
+
+    my $cursor = $self->supported_features;
+
+    # traverse the feature list,
+    for (@spec) {
+        die "bad feature spec: @spec" if ref($cursor) ne "HASH";
+
+        $cursor = $cursor->{$_};
+    }
+
+    return $cursor;
+}
 
 __PACKAGE__;