Google APIs Client Library for C++
|
The OAuth 2.0 module provides support for RFC 6749 OAuth 2.0. More...
Classes | |
class | OAuth2ClientSpec |
A data object containing specifying the client information to present to the OAuth 2.0 server. More... | |
class | OAuth2Credential |
Specifies an OAuth 2.0 Credential. More... | |
struct | OAuth2RequestOptions |
Options for overriding the default attributes in an OAuth2AuthorizationFlow when making OAuth2TokenRequests. More... | |
class | OAuth2AuthorizationFlow |
Mediates interaction with the user, client and an OAuth 2.0 server to obtain credentials for accessing protected resources. More... | |
class | OAuth2InstalledApplicationFlow |
Manages credentials using OAuth 2.0 installed application flow. More... | |
class | OAuth2WebApplicationFlow |
Manages credentials using OAuth 2.0 web application flow. More... | |
class | WebServerAuthorizationCodeGetter |
An adapter to use webserver with OAuth2AuthorizationFlows. More... | |
Typedefs | |
typedef Callback2< const util::Status &, const StringPiece & > | OAuth2BasicAuthorizationCodeNotificationHandler |
Callback used to process authorization codes received from the OAuth 2.0 server. |
The OAuth 2.0 module provides support for RFC 6749 OAuth 2.0.
The Google Cloud Platform uses OAuth 2.0 to authorize access to services and endpoints when refering user data and other protected resources.
The OAuth 2.0 module provides the authorization for the HTTP transport layer by using building on the AuthorizationCredential abstraction defined by the transport layer. It adds a specialized mediator, OAuth2AuthorizationFlow, to simplify the complex interactions making up the OAuth 2.0 protocol.
The other abstractions using AuthorizationCredential can be used with the OAuth2Credential defined by this module. This includes CredentialStore for persisting credentials. The high level OAuth2AuthorizationFlow mediator provides support for using a CredentialStore.
typedef Callback2<const util::Status&, const StringPiece&> OAuth2BasicAuthorizationCodeNotificationHandler |
Callback used to process authorization codes received from the OAuth 2.0 server.
In practice this is used for the response handling for Authorization Codes where we give a redirect_uri to the OAuth 2.0 server for where to forward the code. The url will be the response with the state parameter used to map back to the original request.
In practice you'll probably want to curry additional data parameters with the callback so that you have additional context to the inquiry.
[in] | status | If not ok then we're cancelling the request for some reason, such as a timeout. |
[in] | code | The authorization code if ok, otherwise ignored. |