Mojo-JWT-Google
view release on metacpan or search on metacpan
343536373839404142434445464748495051525354And add any attribute
defined
in this class. The JWT is fairly useless
unless
you define your scopes.
my
$gjwt
= Mojo::JWT::Google->new(
secret
=>
's3cr3t'
,
scopes
=> [
'/my/scope/a'
,
'/my/scope/b'
],
client_email
=>
'riche@cpan.org'
)->encode;
You can also get your information automatically from the .json you
received from Google. Your secret key is in that file, so it's best to
keep it safe somewhere. This will ease some busy work in configuring the
object --
with
virtually the only things to
do
is determine the scopes
and the user_as
if
you need to impersonate.
my
$gjwt
= Mojo::JWT::Google
->new(
from_json
=>
'/my/secret.json'
,
scopes
=> [
'/my/scope/a'
,
'/my/scope/b'
])->encode;
To authenticate,
send
a post request to
Mojo::JWT::Google's as_form_data method as the payload.
lib/Mojo/JWT/Google.pm view on Meta::CPAN
125126127128129130131132133134135136137138139140141142143144145And add any attribute
defined
in this class. The JWT is fairly useless
unless
you define your scopes.
my
$gjwt
= Mojo::JWT::Google->new(
secret
=>
's3cr3t'
,
scopes
=> [
'/my/scope/a'
,
'/my/scope/b'
],
client_email
=>
'riche@cpan.org'
)->encode;
You can also get your information automatically from the .json you received
from Google. Your secret key is in that file, so it's best to keep it safe
somewhere. This will ease some busy work in configuring the object --
with
virtually the only things to
do
is determine the scopes and the user_as
if
you
need to impersonate.
my
$gjwt
= Mojo::JWT::Google
->new(
from_json
=>
'/my/secret.json'
,
scopes
=> [
'/my/scope/a'
,
'/my/scope/b'
])->encode;
with
your Mojo::JWT::Google's as_form_data method as the payload.
( run in 0.423 second using v1.01-cache-2.11-cpan-454fe037f31 )