Skip to content

Chipsoid/yandex-oauth-perl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NAME

Yandex::OAuth - module for get access token to Yandex.API

SYNOPSIS

use Yandex::OAuth;

my $oauth = Yandex::OAuth->new(
    client_id     => '76df1cf****************fb31d0289',
    client_secret => 'e3a2855****************4de3c2afc',
);

# return link for open in browser
say $oauth->get_code();

# return JSON with access_token
say Dumper $oauth->get_token( code => 3557461 );

# return JSON with access_token
say Dumper $oauth->refresh_token( refresh_token => 3557461 );

DESCRIPTION

Yandex::OAuth is a module for get access token for Yandex.API See more at https://tech.yandex.ru/oauth/doc/dg/concepts/ya-oauth-intro-docpage/

METHODS

  • get_code()

    return a link for open in browser

      $oauth->get_code();
    
  • get_token()

    return a json with access_token or error if code has expired

      $oauth->get_token( code => XXXXXX );
    
  • refresh_token()

    return a json with access_token or error if refresh_token has alredy been used

      $oauth->refresh_token( refresh_token => XXXXXX );
    

LICENSE

Copyright (C) Andrey Kuzmin.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

AUTHOR

Andrey Kuzmin chipsoid@cpan.org

About

Perl module for Yandex OAuth

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages