NAME
OAuthomatic::Internal::MicroWeb - temporary embedded web server used internally - management code
VERSION
version 0.0202
DESCRIPTION
Utility class used internally by OAuthomatic: temporary web server spawned in separate thread, used to receive final redirect of OAuth sequence, and to present additional pages to the user.
This module provides methods to manage this server and communicate with it, OAuthomatic::Internal::MicroWebSrv contains it's actual implementation.
PARAMETERS
port
Port the helper runs at. By default allocated randomly.
template_dir
Directory containing page templates. By default, use templates provided with OAuthomatic (according to html_dir
param).
static_dir
Directory containing static files referenced by templates. By default, use templates provided with OAuthomatic (according to html_dir
param).
verbose
Enable console logging of web server interactions.
callback_path
URL path used in OAuth callback (/oauth_granted by default).
client_key_path
URL path used in user interactions (/client_key by default).
METHODS
start
Start embedded web server. To be called (from main thread) before any ineractions begin.
stop
Stop embedded web server. To be called (from main thread) after OAuth is properly configured.
start_using
Starts if not yet running. Increases usage counter.
finish_using
Decreass usage counter. Stops if it tropped to 0.
wait_for_oauth_grant
Wait until OAuth post-rights-grant callback arrives and return tokens it provided. Blocks until then. Throws proper error if failed.
To be called from the main thread.
wait_for_client_cred
Wait until user entered application tokens. Blocks until then.
To be called from the main thread.
ATTRIBUTES
config
OAuthomatic::Config object used to bundle various configuration params.
server
OAuthomatic::Server object used to bundle server-related configuration params.
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.