Google APIs Client Library for C++
OAuth2ExchangeAuthorizationCodeRequest Class Reference

A concrete OAuth2TokenRequest for turning an authorization code into access and refresh tokens. More...

#include "client/auth/oauth2_authorization.h"

+ Inheritance diagram for OAuth2ExchangeAuthorizationCodeRequest:

List of all members.

Public Member Functions

 OAuth2ExchangeAuthorizationCodeRequest (HttpTransport *transport, const StringPiece &authorization_code, const OAuth2ClientSpec &client, const OAuth2RequestOptions &options, OAuth2Credential *credential)
 Constructs the request.
virtual util::Status Execute ()
 Asks the OAuth 2.0 server for an initial Access Token and Refresh Token.

Detailed Description

A concrete OAuth2TokenRequest for turning an authorization code into access and refresh tokens.

Deprecated:
Use OAuth2AuthorizatioFlow methods

Constructor & Destructor Documentation

OAuth2ExchangeAuthorizationCodeRequest ( HttpTransport transport,
const StringPiece &  authorization_code,
const OAuth2ClientSpec client,
const OAuth2RequestOptions options,
OAuth2Credential credential 
)

Constructs the request.

The caller retains ownership to all parameters. The instance will be using these pointers so the caller must keep them valid over the lifetime of the request.

Parameters:
[in]transportTransport instance to use.
[in]authorization_codeThe authorization code from the user action that authorized access.
[in]clientClient specification.
[in]optionsCan override the redirect_uri from the one in the client parameter.
[in]credentialThe credential to update with the response tokens.

Member Function Documentation

virtual util::Status Execute ( ) [virtual]

Asks the OAuth 2.0 server for an initial Access Token and Refresh Token.

This will update the credential given the constructor on success.

Implements OAuth2TokenRequest.


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