Mojo-JWT-Google
view release on metacpan or search on metacpan
And 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
https://www.googleapis.com/oauth2/v4/token, with your
Mojo::JWT::Google's as_form_data method as the payload.
lib/Mojo/JWT/Google.pm view on Meta::CPAN
And 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 https://www.googleapis.com/oauth2/v4/token,
with your Mojo::JWT::Google's as_form_data method as the payload.
( run in 0.241 second using v1.01-cache-2.11-cpan-87723dcf8b7 )