Group
Extension

Matches 35359

WWW-LetsEncrypt ( B/BA/BALLARD/WWW-LetsEncrypt-0.002.tar.gz, BALLARD, 2016; MetaCPAN )
WWW-LetsEncrypt/lib/WWW/LetsEncrypt/JWA.pm ( view source; MetaCPAN )
sed together with WWW::LetsEncrypt::JWK as parents
will create a JSON Web Key that implements all the functions needed for signing
JSON Web Signature objects.

=head2 Attributes

'alg' a scalar attrib
Dist-Zilla-Plugin-OptionalFeature ( E/ET/ETHER/Dist-Zilla-Plugin-OptionalFeature-0.023.tar.gz, ETHER, 2016; MetaCPAN )
Dist-Zilla-Plugin-OptionalFeature/lib/Dist/Zilla/Plugin/OptionalFeature.pm ( view source; MetaCPAN )
pan-meta/issues/28
    # but this is the current v2.0 spec - regexp lifted from Test::CPAN::Meta::JSON::Version
    $self->log_fatal('invalid syntax for optional feature name \'' .  $self->name . '\''
WWW-LetsEncrypt ( B/BA/BALLARD/WWW-LetsEncrypt-0.002.tar.gz, BALLARD, 2016; MetaCPAN )
WWW-LetsEncrypt/lib/WWW/LetsEncrypt/JWS.pm ( view source; MetaCPAN )
se strict;
use warnings;

use Encode qw(encode_utf8);
use MIME::Base64 qw(encode_base64url);

use JSON;
use Moose;

has 'payload' => (
	is      => 'rw',
	isa     => 'HashRef',
	default => sub { return
eaders if %{$self->headers};

	return encode_json($output);
}

sub _serialize_hash {
	my ($hash_ref) = @_;
	return encode_base64url(encode_utf8(encode_json($hash_ref)));
}

__PACKAGE__->meta->make_imm
({
	item1 => 'a',
});

IOFunction($JWS->serialize());

=head1 DESCRIPTION

A (mostly) implemented JSON Web Signature object as per the RFC specification.
This object's implementation follows the JWS R
OpenAPI ( A/AL/ALTREUS/OpenAPI-0.001.tar.gz, ALTREUS, 2016; MetaCPAN )
OpenAPI/lib/OpenAPI.pm ( view source; MetaCPAN )
ally, modulo lazy fetching of references.
That means that when a parsed schema is rendered out to JSON, it should look
the same as the original document.

Probably the sane way to do this would be to 
WebService-FritzBox ( R/RC/RCL/WebService-FritzBox-0.01.tar.gz, RCL, 2016; MetaCPAN )
WebService-FritzBox/lib/WebService/FritzBox.pm ( view source; MetaCPAN )
 WebService::FritzBox;
# ABSTRACT: Interface to FritzBox devices
use Digest::MD5 qw/md5_hex/;
use JSON::MaybeXS;
use LWP::UserAgent;
use Log::Log4perl;
use Moose;
use MooseX::Params::Validate;
use Try
ata = decode_json( $response->decoded_content );
        # It's just an array with one element...
        $data = $data->[0];
    }catch{
        $self->log->logdie( "Could not decode json: $_" );
   
WebService-SOP-Auth-V1_1 ( Y/YO/YOWCOW/WebService-SOP-Auth-V1_1-0.04.tar.gz, YOWCOW, 2016; MetaCPAN )
WebService-SOP-Auth-V1_1/lib/WebService/SOP/Auth/V1_1/Util.pm ( view source; MetaCPAN )
warnings;
use Carp ();
use Digest::SHA qw(hmac_sha256_hex);
use Exporter qw(import);
use JSON::XS qw(decode_json);

our @EXPORT_OK = qw( create_signature is_signature_valid );

our $SIG_VALID_FOR_SEC 

    $time ||= time;

    my $req_time = ref($params) ? $params->{time}
                 : decode_json($params)->{time};

    return if not $req_time;
    return if $req_time < ($time - $SIG_VALID_FOR
Test-Mojo-More ( C/CO/COOLMEN/Test-Mojo-More-0.061.tar.gz, COOLMEN, 2016; MetaCPAN )
Test-Mojo-More/lib/Test/Mojo/More.pm ( view source; MetaCPAN )
package Test::Mojo::More;

use Mojo::Base 'Test::Mojo';
use Test::More;
use Mojo::JSON::Pointer;
use Mojo::Message::Request;
use Mojolicious;
use Mojolicious::Controller;
use Mojo::Transaction::HTTP;
} );
  $t = $t->flash_is( '/error/message', 'error message' );

Check flash the given JSON Pointer with Mojo::JSON::Pointer.

=cut

sub flash_is {
	my ($self, $key, $value, $desc) = @_;
	my ( $flash, 
deeply',
		_pointer( $flash, $path ? "/$path" : "" ),
		$value,
		$desc || "flash exact match for JSON Pointer \"$key\"",
	);
}


=head2 C<flash_has>

  $t = $t->flash_has( '/error' );
  $t = $t->flas
WebService-Pandora ( D/DE/DEFCON/WebService-Pandora-0.4.tar.gz, DEFCON, 2016; MetaCPAN )
WebService-Pandora/lib/WebService/Pandora.pod ( view source; MetaCPAN )
N

B<WebService::Pandora> is a module to communicate with the Pandora (L<http://www.pandora.com>) JSON API.
The API is not officially published, and has a few oddities, but was reverse engineered and 
RPM-Packager ( S/SY/SYAGI/RPM-Packager-v0.3.5.tar.gz, SYAGI, 2016; MetaCPAN )
RPM-Packager/lib/RPM/Packager.pm ( view source; MetaCPAN )
cify anything if package is os-independent
    dependencies:
      - perl-YAML > 0.5
      - perl-JSON
    files:
      bin: /usr/local/bin               # directory-based mapping.  RPM will install C
=> '/usr/local/bin' },
        dependencies => [
            'perl-YAML > 0.5',
            'perl-JSON'
        ],
        os      => 'el6',
        user    => 'apache',
        group   => 'apache',
 
WebService-Pandora ( D/DE/DEFCON/WebService-Pandora-0.4.tar.gz, DEFCON, 2016; MetaCPAN )
WebService-Pandora/lib/WebService/Pandora/Method.pod ( view source; MetaCPAN )
or() );

=head1 DESCRIPTION

B<WebService::Pandora::Method> is a module which queries the Pandora JSON API using the
B<LWP::UserAgent> and B<HTTP::Request> libraries.  It is used by the main B<WebServ
dule for all of the webservice methods it exposes.  It handles all of the encryption,
decryption, JSON conversion, and the Pandora API oddities for you.

=head1 CONSTRUCTOR

=head2 new

Creates a new 
iven.  The method can
then be B<execute()>ed, returning a decrypted hashref representation of the JSON string returned
by the Pandora API method.

  $method = WebService::Pandora::Method->new( name =>
WebService-BambooHR ( N/NE/NEILB/WebService-BambooHR-0.07.tar.gz, NEILB, 2016; MetaCPAN )
WebService-BambooHR/lib/WebService/BambooHR/UserAgent.pm ( view source; MetaCPAN )
y $auth     = encode_base64($self->api_key.':x', '');
    my $headers  = { Accept => 'application/json', 'Authorization' => "Basic $auth" };
    my $response = $ua->request('GET', $full_url, { headers
y $auth     = encode_base64($self->api_key.':x', '');
    my $headers  = { Accept => 'application/json', 'Authorization' => "Basic $auth" };
    my $response = $ua->request('POST', $full_url, { header
WebService-BambooHR ( N/NE/NEILB/WebService-BambooHR-0.07.tar.gz, NEILB, 2016; MetaCPAN )
WebService-BambooHR/lib/WebService/BambooHR.pm ( view source; MetaCPAN )
use Moo           2.000000;
use HTTP::Tiny    0.045;
use Try::Tiny     0.13;
use JSON::MaybeXS 1.003003 qw/ decode_json /;

with 'WebService::BambooHR::UserAgent';
use WebService::BambooHR::Employee;
 .qq{\n</fields>\n</report>\n};
    my $response = $self->_post('reports/custom?format=json', $body);
    my $json     = $response->{content};

    # Workaround for a issues in BambooHR:
    #   - if 
r field '1610' you get back '1610.0'
    $json =~ s/"employmentStatus":/"status":/g;
    $json =~ s/"1610.0":/"1610":/g;

    my $report   = decode_json($json);
    return map { WebService::BambooHR::
WebService-Pandora ( D/DE/DEFCON/WebService-Pandora-0.4.tar.gz, DEFCON, 2016; MetaCPAN )
WebService-Pandora/lib/WebService/Pandora/Method.pm ( view source; MetaCPAN )
ice::Pandora::Method;

use strict;
use warnings;

use WebService::Pandora::Cryptor;

use URI;
use JSON;
use HTTP::Request;
use LWP::UserAgent;
use Data::Dumper;

### constructor ###

sub new {

    my
 = LWP::UserAgent->new( timeout => $self->{'timeout'} );

    # create and store json object
    $self->{'json'} = JSON->new();

    return $self;
}

### getters/setters ###

sub error {

    my ( $se
.' );
        return;
    }

    # craft the json data accordingly
    my $json_data = {};

    if ( defined( $self->{'userAuthToken'} ) ) {

        $json_data->{'userAuthToken'} = $self->{'userAuthT
Test-Mojo-Role-TestDeep ( P/PR/PREACTION/Test-Mojo-Role-TestDeep-0.007.tar.gz, PREACTION, 2016; MetaCPAN )
Test-Mojo-Role-TestDeep/lib/Test/Mojo/Role/TestDeep.pm ( view source; MetaCPAN )

use strict;
use warnings;
use Role::Tiny;
use Test::More;
use Test::Deep qw( cmp_deeply );


sub json_deeply {
    my ( $t, $ptr, $expect, $desc ) = @_;

    # Pointer is an optional argument
    if 
 a simple scalar (did you mean to use json_is()?)"
        if !ref $expect;

    $desc ||= qq{deeply match JSON Pointer "$ptr"};

    my $given = $t->tx->res->json( $ptr );

    local $Test::Builder::
t::Builder::Level + 1;
    my $result = cmp_deeply( $given, $expect, $desc )
        or diag "Got JSON: ", explain $given;
    return $t->success( $result );
}


sub text_deeply {
    my ( $t, $sel, $
WebService-Pandora ( D/DE/DEFCON/WebService-Pandora-0.4.tar.gz, DEFCON, 2016; MetaCPAN )
WebService-Pandora/lib/WebService/Pandora.pm ( view source; MetaCPAN )
e::Pandora::Method;
use WebService::Pandora::Cryptor;
use WebService::Pandora::Partner::iOS;

use JSON;
use Data::Dumper;

our $VERSION = '0.4';

### constructor ###

sub new {

    my $caller = shift
deExtendedAttributes'};

    $includeExtendedAttributes = ( $includeExtendedAttributes ) ? JSON::true() : JSON::false();

    # make sure they provided a stationToken argument
    if ( !defined( $stat
Positive must be specified.' );
        return;
    }

    $isPositive = ( $isPositive ) ? JSON::true() : JSON::false();

    # create the station.addFeedback method w/ appropriate params
    my $meth
WebService-Pandora ( D/DE/DEFCON/WebService-Pandora-0.4.tar.gz, DEFCON, 2016; MetaCPAN )
WebService-Pandora/lib/WebService/Pandora/Cryptor.pod ( view source; MetaCPAN )
::Cryptor> is used to encrypt and decrypt the data sent to and from
the Pandora JSON API.  Some methods require the JSON to be sent using the Blowfish
algorithm in ECB mode.  Some of the attributes re
is passed
a true value for the B<encrypt> boolean, it uses this module to do so for the submitted
JSON data.

=head1 CONSTRUCTOR

=head2 new

Creates a B<WebService::Pandora::Cryptor> object with the 
encrypted string of the JSON data given that the Pandora
API expects, using the provided B<encryption_key> specified in the constructor.

  $encrypted = $cryptor->encrypt( $json_str );

=head2 decrypt
WebService-Pandora ( D/DE/DEFCON/WebService-Pandora-0.4.tar.gz, DEFCON, 2016; MetaCPAN )
WebService-Pandora/lib/WebService/Pandora/Partner.pod ( view source; MetaCPAN )
to use when encrypting the JSON data being sent to the
Pandora API method.

=item decryption_key =E<gt> STRING [required]

The decryption key to use when decrypting the JSON data send back from the
Pa
String-JS ( P/PE/PERLANCAR/String-JS-0.03.tar.gz, PERLANCAR, 2016; MetaCPAN )
String-JS/lib/String/JS.pm ( view source; MetaCPAN )
 DATE
our $VERSION = '0.03'; # VERSION

use 5.010001;
use strict;
use warnings;

use JSON::MaybeXS;
my $json = JSON::MaybeXS->new->allow_nonref;

use Exporter;
our @ISA = qw(Exporter);
our @EXPORT_OK 
2";
        }
    } else {
        return $json->encode("$str");
    }
}

sub decode_js_string {
    my $str = shift;
    if ($str =~ /\A"/o) {
        $json->decode($str);
    } elsif ($str =~ /\A'/o
JavaScript literal representation using double
quotes (C<">). This is currently implemented using JSON encoding.

If C<$mode> is set to 1, will produce literal representation using single quotes
(C<'>
Net-JBoss ( H/HE/HEINCE/Net-JBoss-0.04.tar.gz, HEINCE, 2016; MetaCPAN )
Net-JBoss/lib/Net/JBoss.pm ( view source; MetaCPAN )
om log4perl
 http_post      = (rwp) if true, use http post method instead of get
 post_json      = (rwp) set json content to be post
 ssl            = (ro) if 'on', use https (default is 'off')
 ssl_v
 define if it's xa datasource, yes/no (default is 'no')

=cut

has [qw/url log json_data resource_url http_post post_json /]   => ( is => 'rwp' );
has [qw/username password/]                          
      croak "post_json not set"
            unless $self->post_json;
        
        my $req = HTTP::Request->new(POST => $self->url);
        $req->content_type  ('application/json');
        $req->
Net-JBoss ( H/HE/HEINCE/Net-JBoss-0.04.tar.gz, HEINCE, 2016; MetaCPAN )
Net-JBoss/lib/Net/JBoss/Management.pm ( view source; MetaCPAN )
->http_post) {
        $self->_set_post_json('{"operation":"read-attribute","name":"server-state","json.pretty":1}');
        $self->log->debug($self->post_json);
    }
    else {
        $self->_set_
resource_url('/?operation=attribute&name=server-state&json.pretty');
        $self->log->debug($self->resource_url);
    }
    
    $self->get_api_response();
}

=head2 get_jvm_usage

 return jvm usag
et_resource_url('/core-service/platform-mbean/type/memory?operation=resource&include-runtime=true&json.pretty');
    $self->log->debug($self->resource_url);
    
    $self->get_api_response();
}

=hea

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