Google APIs Client Library for C++
OAuth2WebApplicationFlow Class Reference

Manages credentials using OAuth 2.0 web application flow. More...

#include "client/auth/oauth2_authorization.h"

+ Inheritance diagram for OAuth2WebApplicationFlow:

List of all members.

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.

Detailed Description

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.


Constructor & Destructor Documentation

OAuth2WebApplicationFlow ( HttpTransport transport) [explicit]
virtual ~OAuth2WebApplicationFlow ( ) [virtual]

Member Function Documentation

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.

Parameters:
[in]scopesThe 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.
Returns:
The appropriate URL to HTTP GET.
See also:
RefreshCredentialWithOptions.
GeenrateAuthorizationCodeRequestUrlWithOptions

Reimplemented from OAuth2AuthorizationFlow.

virtual util::Status InitFromJsonData ( const SimpleJsonData *  data) [protected, virtual]

Intitializes from the JSON data, including web-flow specific attributes.

Parameters:
[in]dataThe 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.

Parameters:
[in]forceIf 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.

Parameters:
[in]offlineIf true then access_type will be "offline". Otherwise it will be the default ("online").

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines