NAME
Moo::Google::AuthStorage - Provide universal methods to fetch tokens from different types of data sources. Default is jsonfile
VERSION
version 0.03
METHODS
setup
Set appropriate storage
my
$auth_storage
= Moo::Google::AuthStorage->new;
$auth_storage
->setup;
# by default will be config.json
$auth_storage
->setup({
type
=>
'jsonfile'
,
path
=>
'/abs_path'
});
$auth_storage
->setup({
type
=>
'dbi'
,
path
=>
'DBI object'
});
$auth_storage
->setup({
type
=>
'mongodb'
,
path
=>
'details'
});`
file_exists
Check if file exists in a root catalog. Function is used to speed up unit testing.
get_credentials_for_refresh
Return all parameters that is needed for Mojo::Google::AutoTokenRefresh::refresh_access_token() function: client_id, client_secret and refresh_token
$c->get_credentials_for_refresh('examplemail@gmail.com')
This method must have all subclasses of Moo::Google::AuthStorage
AUTHOR
Pavel Serikov <pavelsr@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2017 by Pavel Serikov.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.