Group
Extension

Matches 3

Net-OAuth2 ( U/UH/UHLE/Net-OAuth2-0.67.tar.gz, UHLE, 2021; MetaCPAN )
Net-OAuth2/lib/Net/OAuth2/AccessToken.pm ( view source; MetaCPAN )
t;

our $VERSION;  # to be able to test in devel environment

use Carp qw(croak);
use JSON::MaybeXS qw/encode_json/;

# Attributes to be saved to preserve the session.
my @session = qw/access_token to
ned $refresh;

    $token;
}

#--------------

sub to_json()
{   my $self = shift;
    encode_json $self->session_freeze;
}
*to_string = \&to_json;  # until v0.50


sub session_freeze(%)
{   my ($self
Net-OAuth2 ( U/UH/UHLE/Net-OAuth2-0.67.tar.gz, UHLE, 2021; MetaCPAN )
Net-OAuth2/lib/Net/OAuth2/Profile.pm ( view source; MetaCPAN )
use MIME::Base64 qw(encode_base64);
use LWP::UserAgent ();
use URI            ();
use JSON::MaybeXS  qw/decode_json/;
use Scalar::Util   qw/blessed/;
use Encode         qw/encode/;

use constant MIME_
cation/json is often not correctly configured: is not
        # (yet) an apache pre-configured extension   :(
        if(my $params = eval {decode_json $content} )
        {   # content is JSON
      
Net-OAuth2 ( U/UH/UHLE/Net-OAuth2-0.67.tar.gz, UHLE, 2021; MetaCPAN )
Net-OAuth2/lib/Net/OAuth2/AccessToken.pod ( view source; MetaCPAN )
get($request);
  my $response = $session->get($header, $content);
  print $session->to_string;  # JSON

  # probably better to set new(auto_refresh), but you may do:
  $session->refresh if $session->e
 you store this in a
MySQL database.  Perl's JSON module will output utf8 by default.

=item $obj-E<gt>B<to_json>()

Freeze this object into JSON.  The JSON syntax is also used by the OAuth2
protocol,

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