|
Google APIs Client Library for C++
|
Manages credentials using OAuth 2.0 web application flow. More...
#include "client/auth/oauth2_authorization.h"
Inheritance diagram for OAuth2WebApplicationFlow:Public Member Functions | |
| OAuth2WebApplicationFlow (HttpTransport *transport) | |
| virtual | ~OAuth2WebApplicationFlow () |
| virtual string | GenerateAuthorizationCodeRequestUrl (const StringPiece &scope) const |
| Returns a URL to the OAuth 2.0 server requesting a new Authorization Code. | |
| bool | force_approval_prompt () const |
| Returns whether or not the "approval_prompt" should be 'force'. | |
| void | set_force_approval_prompt (bool force) |
| Used to set the approval_prompt attribute. | |
| bool | offline_access_type () const |
| Returns whether the "access_type" attribute should be 'offline'. | |
| void | set_offline_access_type (bool offline) |
| Used to set the access_type attribute. | |
Protected Member Functions | |
| virtual util::Status | InitFromJsonData (const SimpleJsonData *data) |
| Intitializes from the JSON data, including web-flow specific attributes. | |
Manages credentials using OAuth 2.0 web application flow.
This is a specialization of OAuth2Authorization flow.
The web application flow adds the "approval_prompt" and "access_type" attributes.
| OAuth2WebApplicationFlow | ( | HttpTransport * | transport | ) | [explicit] |
| virtual ~OAuth2WebApplicationFlow | ( | ) | [virtual] |
| bool force_approval_prompt | ( | ) | const [inline] |
Returns whether or not the "approval_prompt" should be 'force'.
| virtual string GenerateAuthorizationCodeRequestUrl | ( | const StringPiece & | scopes | ) | const [virtual] |
Returns a URL to the OAuth 2.0 server requesting a new Authorization Code.
This method is only intended when manually implementing flows.
| [in] | scopes | The desired scopes. If more than one scope is desired then this should be a ' '-delimited string. The scope values are specified by the specific service you wish to get authorization to access. |
Reimplemented from OAuth2AuthorizationFlow.
| virtual util::Status InitFromJsonData | ( | const SimpleJsonData * | data | ) | [protected, virtual] |
Intitializes from the JSON data, including web-flow specific attributes.
| [in] | data | The json data specifying the flow. |
Reimplemented from OAuth2AuthorizationFlow.
| bool offline_access_type | ( | ) | const [inline] |
Returns whether the "access_type" attribute should be 'offline'.
| void set_force_approval_prompt | ( | bool | force | ) | [inline] |
Used to set the approval_prompt attribute.
| [in] | force | If true then approval_prompt will be "force". Otherwise it will be the default ("auto"). |
| void set_offline_access_type | ( | bool | offline | ) | [inline] |
Used to set the access_type attribute.
| [in] | offline | If true then access_type will be "offline". Otherwise it will be the default ("online"). |