The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

OAuthomatic::UserInteraction - Wrapping communication with user

VERSION

version 0.0202

DESCRIPTION

Role defining methods related to communication with end user.

METHODS

prompt_client_credentials() => ClientCred(...)

Asks the user to visit appropriate remote page and provide application (or developer) keys. Should return OAuthomatic::Types::ClientCred.

Implementation can either prompt user interactively (on the terminal, in browser, in GUI window...), hinting her or him which place to visit, or have those values hardcoded/loaded from elsewhere.

Note that while methods below are (mostly) parameterless, this object will work in context of specific site and application, and should likely require information about those in the constructor.

See OAuthomatic::UserInteraction::ViaMicroWeb and OAuthomatic::UserInteraction::ConsolePrompts for example implementations.

visit_oauth_authorize_page($app_auth_url)

Send user to the page of given url (which points to grant access to application ... page and already contains all necessary parameters).

prepare_to_work()

Prepare anything necessary to handle other calls.

cleanup_after_work()

Called once object is no longer needed, may cleanup whatever prepare_to_work initialized or started.

AUTHOR

Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>

COPYRIGHT AND LICENSE

This software is copyright (c) 2015 by Marcin Kasperski.

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