OAuthomatic::Types - few helper types to make code more readable and less error-prone
Types below are defined to make code a bit more readable and less error prone.
Role composed into types defined below. Handles a few common conventions.
Adds two conventions to usual parameter handling:
data
and remap
are given to the constructor,
they are used to translate field names,
for example:
Something->new(data=>{aaa=>'x', bbb=>'y'}, remap=>{aaa=>'token', 'bbb'=>'secret');
is equivalent to:
Something->new(token=>'x', secret=>'y');
Partial replacements are possible too:
Something->new(data=>{token=>'x', bbb=>'y'}, remap=>{'bbb'=>'secret');
Checks whether given object is of given structure type. Returns 1 if so, 0 if it is undef, throws if it is of another type.
Compares two objects, allowing undef-s but raises on wrong type.
Client (application) credentials. Fixed key and secret allocated manually using server web interface (usually after filling some form with various details) which identify the application.
Client key - the application identifier.
Client secret - confidential value used to sign requests, to prove key is valid.
Temporary (request) credentials. Used during process of allocating token credentials.
Actual token - identifier quoted in requests.
Associated secret - confidential value used to sign requests, to prove they are valid.
Full URL of the page end user should use to spend this temporary credential and generate access token. Already contains the token.
Token (access) credentials. Those are used to sign actual API calls.
Verifier info, returned from authorization.