Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

auth to Authとか

  • Loading branch information...
commit fa1d6dc8e45512fcb2108899bbbb19f76769cd3c 1 parent 9746e33
@nekokak authored
View
5 eg/lib/MyAPP/Web/Controller/Root.pm
@@ -1,9 +1,8 @@
package MyAPP::Web::Controller::Root;
use Kamui::Web::Controller -base;
-use HTTP::MobileAttribute plugins => [qw/IS/];
use Encode;
-#__PACKAGE__->authorizer('+MyAPP::Web::Authorizer::BasicAuth');
+__PACKAGE__->authorizer('+MyAPP::Web::Authorizer::BasicAuth');
__PACKAGE__->add_trigger(
'before_dispatch' => sub{
@@ -78,7 +77,7 @@ sub do_mobile {
$c->stash->{method} = 'get';
}
-sub do_moge : auth('Null') {
+sub do_moge : Auth('Null') {
}
sub do_json {
View
2  eg/lib/MyAPP/Web/Handler.pm
@@ -3,7 +3,7 @@ use Kamui::Web::Handler;
use_container 'MyAPP::Container';
#use_plugins [qw/+MyAPP::Plugin::Foo Mobile::Attribute Encode/];
-use_plugins [qw/+MyAPP::Plugin::Foo Mobile::Attribute/];
+use_plugins [qw/+MyAPP::Plugin::Foo Mobile::Agent/];
#use_plugins [qw/+MyAPP::Plugin::Foo Mobile::Attribute Mobile::Encode/];
use_context 'MyAPP::Web::Context';
use_view 'Kamui::View::TT';
View
2  lib/Kamui/View/TT.pm
@@ -28,7 +28,7 @@ sub render {
c => $context,
},
\my $output
- ) or die $@;
+ ) or die "error: $@";
my $res = $context->res;
$res->status('200');
View
2  lib/Kamui/Web/Controller.pm
@@ -46,7 +46,7 @@ my $cache = +{};
sub attr_cache {
my ($class, $code, $attr) = @_;
if ($attr) {
- (my $auth_pkg = $attr->[0]) =~ s/auth\('(.+)'\)/$1/;
+ (my $auth_pkg = $attr->[0]) =~ s/Auth\('(.+)'\)/$1/;
$cache->{$code} = $auth_pkg;
} else {
return $cache->{$code};
View
1  lib/Kamui/Web/Request.pm
@@ -3,6 +3,7 @@ use Kamui;
use base 'Plack::Request';
sub is_post_request { $_[0]->method eq 'POST' }
+sub http_host { $_[0]->env->{HTTP_HOST} }
1;
Please sign in to comment.
Something went wrong with that request. Please try again.