Group
Extension

Matches 10

oauth-lite2 ( R/RI/RITOU/oauth-lite2-0.05.tar.gz, RITOU, 2013; MetaCPAN )
oauth-lite2/lib/OAuth/Lite2/Formatter/JSON.pm ( view source; MetaCPAN )
e OAuth::Lite2::Formatter::JSON;

use strict;
use warnings;

use parent 'OAuth::Lite2::Formatter';

use JSON;
use Try::Tiny;

sub name { "json" }
sub type { "application/json" };

sub format {
    my 
 @_;
    return JSON->new->encode($hash);
}

sub parse {
    my ($self, $json) = @_;
    return JSON->new->decode($json);
}

=head1 NAME

OAuth::Lite2::Formatter::JSON - OAuth 2.0 JSON formatters stor
matter = OAuth::Lite2::Formatter::JSON->new;
    my $obj = $formatter->parse( $string );
    $string = $formatter->format( $obj );

=head1 DESCRIPTION

OAuth 2.0 JSON formatter

=head1 METHODS

=head2
oauth-lite2 ( R/RI/RITOU/oauth-lite2-0.05.tar.gz, RITOU, 2013; MetaCPAN )
oauth-lite2/lib/OAuth/Lite2/Server/Endpoint/Token.pm ( view source; MetaCPAN )
est) = @_;

    # from draft-v8, format is specified to JSON only.
    my $format = "json";
    # my $format = $request->param("format") || "json";
    my $formatter = OAuth::Lite2::Formatters->get_fo
rmatter_by_name($format)
        || OAuth::Lite2::Formatters->get_formatter_by_name("json");

    my $res = try {

        my $type = $request->param("grant_type")
            or OAuth::Lite2::Server:
oauth-lite2 ( R/RI/RITOU/oauth-lite2-0.05.tar.gz, RITOU, 2013; MetaCPAN )
oauth-lite2/lib/OAuth/Lite2/Formatter.pm ( view source; MetaCPAN )
se( $formatted_string );

=head1 SEE ALSO

L<OAuth::Lite2::Formatters>
L<OAuth::Lite2::Formatter::JSON>
L<OAuth::Lite2::Formatter::XML>
L<OAuth::Lite2::Formatter::FormURLEncoded>

=head1 AUTHOR

Lyo K
oauth-lite2 ( R/RI/RITOU/oauth-lite2-0.05.tar.gz, RITOU, 2013; MetaCPAN )
oauth-lite2/lib/OAuth/Lite2/Client/ClientCredentials.pm ( view source; MetaCPAN )
nt(
            join "/", __PACKAGE__, $OAuth::Lite2::VERSION);
    }

    # $self->{format} ||= 'json';
    $self->{response_parser} = OAuth::Lite2::Client::TokenResponseParser->new;

    return $sel
oauth-lite2 ( R/RI/RITOU/oauth-lite2-0.05.tar.gz, RITOU, 2013; MetaCPAN )
oauth-lite2/lib/OAuth/Lite2/Client/UsernameAndPassword.pm ( view source; MetaCPAN )
nt(
            join "/", __PACKAGE__, $OAuth::Lite2::VERSION);
    }

    # $self->{format} ||= 'json';
    $self->{response_parser} = OAuth::Lite2::Client::TokenResponseParser->new;

    return $sel
oauth-lite2 ( R/RI/RITOU/oauth-lite2-0.05.tar.gz, RITOU, 2013; MetaCPAN )
oauth-lite2/lib/OAuth/Lite2/Client/WebServer.pm ( view source; MetaCPAN )
gent(
            join "/", __PACKAGE__, $OAuth::Lite2::VERSION);
    }

    $self->{format} ||= 'json';
    $self->{response_parser} = OAuth::Lite2::Client::TokenResponseParser->new;

    return $sel
oauth-lite2 ( R/RI/RITOU/oauth-lite2-0.05.tar.gz, RITOU, 2013; MetaCPAN )
oauth-lite2/lib/OAuth/Lite2/Formatter/XML.pm ( view source; MetaCPAN )
head1 SEE ALSO

L<OAuth::Lite2::Formatter>
L<OAuth::Lite2::Formatters>
L<OAuth::Lite2::Formatter::JSON>
L<OAuth::Lite2::Formatter::FormURLEncoded>

=head1 AUTHOR

Lyo Kato, E<lt>lyo.kato@gmail.comE<gt
oauth-lite2 ( R/RI/RITOU/oauth-lite2-0.05.tar.gz, RITOU, 2013; MetaCPAN )
oauth-lite2/lib/OAuth/Lite2/Formatter/FormURLEncoded.pm ( view source; MetaCPAN )
head1 SEE ALSO

L<OAuth::Lite2::Formatter>
L<OAuth::Lite2::Formatters>
L<OAuth::Lite2::Formatter::JSON>
L<OAuth::Lite2::Formatter::XML>

=head1 AUTHOR

Lyo Kato, E<lt>lyo.kato@gmail.comE<gt>

=head1 C
oauth-lite2 ( R/RI/RITOU/oauth-lite2-0.05.tar.gz, RITOU, 2013; MetaCPAN )
oauth-lite2/lib/OAuth/Lite2/Formatter/Text.pm ( view source; MetaCPAN )
Auth::Lite2::Formatters>
L<OAuth::Lite2::Formatter::FormURLEncoded.pm>
L<OAuth::Lite2::Formatter::JSON>
L<OAuth::Lite2::Formatter::XML>

=head1 AUTHOR

Lyo Kato, E<lt>lyo.kato@gmail.comE<gt>

=head1 C
oauth-lite2 ( R/RI/RITOU/oauth-lite2-0.05.tar.gz, RITOU, 2013; MetaCPAN )
oauth-lite2/lib/OAuth/Lite2/Formatters.pm ( view source; MetaCPAN )
package OAuth::Lite2::Formatters;

use strict;
use warnings;

use OAuth::Lite2::Formatter::JSON;
use OAuth::Lite2::Formatter::XML;
use OAuth::Lite2::Formatter::FormURLEncoded;
use OAuth::Lite2::Format
S_BY_TYPE{$formatter->type} = $formatter;
}

__PACKAGE__->add_formatter( OAuth::Lite2::Formatter::JSON->new );
__PACKAGE__->add_formatter( OAuth::Lite2::Formatter::XML->new );
__PACKAGE__->add_formatt
ter = OAuth::Lite2::Formatter->get_formatter_by_name("json");
    my $formatter = OAuth::Lite2::Formatter->get_formatter_by_type("application/json");

    my $obj = $formatter->parse( $string );
    $

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.