/test-signature',
{ nonce => "9f952b2e-1675-4be8-bb39-6f4343803c2f" },
my $expect_json = 0,
);
return 1;
}
=head2 access_token
Get an access token.
my $access_token = $
imental::postderef /;
use Business::TrueLayer::Webhook::Mandate;
use namespace::autoclean;
use JSON;
use Mojo::JWT;
use Mojo::UserAgent;
use Carp qw/ croak /;
=head1 ATTRIBUTES
=head2 jwt
The JW
g...
my $jwkset = Mojo::UserAgent->new->get( $jku )
->result->json;
# add the jkws to the instance to allow it to check the signature
ss::TrueLayer::Signer;
use Try::Tiny::SmartCatch;
use Mojo::UserAgent;
use Carp qw/ croak /;
use JSON;
use Data::GUID;
my $MAX_REDIRECTS = 5;
has [ qw/ client_id client_secret kid / ] => (
is
quest_body = undef,
$expect_json = 1,
) {
# sign the request
my $idempotency_key = $self->idempotency_key;
my $json = $http_request_body
? JSON->new->utf8->canonical->encode(
te_path,
$idempotency_key,
$json,
);
return $self->_ua_request(
"https://" . $self->api_host . $absolute_path,
$json,
[
'Authorization' =>
ess::TrueLayer::Types;
use Try::Tiny::SmartCatch;
use Mojo::UserAgent;
use Carp qw/ croak /;
use JSON;
has 'scope' => (
is => 'rw',
isa => 'ArrayRef',
required => 0,
de
return $self;
}
my $url = "https://" . $self->host . "/connect/token";
my $json = JSON->new->utf8->canonical->encode(
{
grant_type => 'client_credentials',
join( " ",$self->scope->@* ),
}
);
my $res_content = $self->_ua_request( $url, $json );
# If any of these are missing, we get "interesting" errors from Moose
# constraint vi
er
A L<Business::TrueLayer::User> object. Hash refs will be coerced.
=back
=cut
# the mandate JSON, as per the TrueLayer docs, contains a key
# "mandate" that has all the stuff in it, rather than
/test-signature',
{ nonce => "9f952b2e-1675-4be8-bb39-6f4343803c2f" },
my $expect_json = 0,
);
return 1;
}
=head2 access_token
Get an access token.
my $access_token = $