Google APIs Client Library for C++
|
The abstraction used to pass credentials also contains knowledge about how to use the credentials to authorize requests. More...
#include "client/transport/http_authorization.h"
Public Member Functions | |
virtual | ~AuthorizationCredential () |
Standard destructor. | |
virtual const StringPiece | type () const =0 |
Returns the type of credential for tracing/debug purposes. | |
virtual util::Status | Refresh ()=0 |
Refreshes credential. | |
virtual util::Status | Load (DataReader *serialized_credential)=0 |
Initialize the credential from a stream. | |
virtual DataReader * | MakeDataReader () const =0 |
Creates a DataReader stream serializing the credential. | |
virtual util::Status | AuthorizeRequest (HttpRequest *request)=0 |
Uses the credential to authorize a request. |
The abstraction used to pass credentials also contains knowledge about how to use the credentials to authorize requests.
In practice this is probably an OAuth2Credential, but this class provides an abstract interface sufficient to keep OAuth 2.0 depedencies out of the HTTP transport layer and core libraries that dont care about the mechanism details.
virtual ~AuthorizationCredential | ( | ) | [virtual] |
Standard destructor.
virtual util::Status AuthorizeRequest | ( | HttpRequest * | request | ) | [pure virtual] |
Uses the credential to authorize a request.
[in,out] | request | The request to authorized will be modified as needed depending on the specific class (e.g. adding an authoriation header). |
Implemented in OAuth2Credential.
virtual util::Status Load | ( | DataReader * | serialized_credential | ) | [pure virtual] |
Initialize the credential from a stream.
[in] | serialized_credential | A serialized credential stream to load from. |
Implemented in OAuth2Credential.
virtual DataReader* MakeDataReader | ( | ) | const [pure virtual] |
Creates a DataReader stream serializing the credential.
Implemented in OAuth2Credential.
virtual util::Status Refresh | ( | ) | [pure virtual] |
virtual const StringPiece type | ( | ) | const [pure virtual] |
Returns the type of credential for tracing/debug purposes.
Implemented in OAuth2Credential.