Risk-Aware AI Code Review for Business-Critical Systems
LiveReview LiveReview Explore LiveReview

OAuth::Lite2::Formatters - OAuth 2.0 formatters store

Author

       Lyo Kato, <lyo.kato@gmail.com>

Description

       OAuth 2.0 formatters store.  from draft-v8, specification requires only JSON format.  This library leaves
       the other formatters for interop.

Methods

get_formatter_by_name($name)
       return formatter by name

   get_formatter_by_type($content_type)
       return formatter by content type

Name

       OAuth::Lite2::Formatters - OAuth 2.0 formatters store

See Also

       OAuth::Lite2::Formatter OAuth::Lite2::Formatter::JSON OAuth::Lite2::Formatter::XML
       OAuth::Lite2::Formatter::FormURLEncoded

Synopsis

           my $formatter = OAuth::Lite2::Formatter->get_formatter_by_name("json");
           my $formatter = OAuth::Lite2::Formatter->get_formatter_by_type("application/json");

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

See Also