Skip to content

Perl implementation of Google OAuth. This bunch of scripts provide what you need to authenticate against google's IMAP/SMTP server. This is inspired by the samples provided by google, only available in Java, Php and Python. See https://developers.google.com/google-apps/gmail/xoauth2_libraries

Notifications You must be signed in to change notification settings

fser/google-imap-oauth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

google-imap-oauth

Perl implementation of https://developers.google.com/google-apps/gmail/xoauth2_libraries

Requirements

This module / script collection use the following modules (available on CPAN):

  • Mail::IMAPClient
  • Config::Simple

How does it work?

First of all, you need to register your application on https://code.google.com/apis/console.

In the API Access tab, you will find 2 parameters: Client ID, Client secret. You need to set them in the settings.ini file.

After that, run perl setup.pl to allow the application to manage your mails. This step will update your settings.ini file.

If in the future, you get 4xx errors, you may need to re-run the setup phase.

You can now use token to produce oauth_strings (the "secret" actually needed for the authentitcation). For that purpose, just run perl get_token.pl which also updates config file.

You are now ready to run the sample client.

Please see TODO bellow.

Further Resources

Todo

  • Token managing should be made easier. Right now, running the client with an expirated token will fail. A workaround is to run perl get_token.pl to update the settings file.

  • Comment perl code :)

About

Perl implementation of Google OAuth. This bunch of scripts provide what you need to authenticate against google's IMAP/SMTP server. This is inspired by the samples provided by google, only available in Java, Php and Python. See https://developers.google.com/google-apps/gmail/xoauth2_libraries

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages