OpenAB  1.0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
OpenAB::OAuth2HttpAuthorizer Class Reference

Class OAuth2HttpAuthorizer Implements OAuth2 authentication method. More...

#include <OAuth2HttpAuthorizer.hpp>

Inheritance diagram for OpenAB::OAuth2HttpAuthorizer:
Collaboration diagram for OpenAB::OAuth2HttpAuthorizer:

Public Member Functions

 OAuth2HttpAuthorizer ()
 Constructor. More...
 
virtual ~OAuth2HttpAuthorizer ()
 Destructor, virtual by default. More...
 
bool authorize (const std::string &clientId, const OpenAB::SecureString &clientSecret, const OpenAB::SecureString &refreshToken)
 Obtains new access token, based on provided data. More...
 
bool authorizeMessage (HttpMessage *curl)
 Authorizes message. More...
 
- Public Member Functions inherited from OpenAB::HttpAuthorizer
virtual ~HttpAuthorizer ()
 Destructor, virtual by default. More...
 

Detailed Description

Class OAuth2HttpAuthorizer Implements OAuth2 authentication method.

Todo:
Current implementation is Google specific.

Constructor & Destructor Documentation

OpenAB::OAuth2HttpAuthorizer::OAuth2HttpAuthorizer ( )

Constructor.

OpenAB::OAuth2HttpAuthorizer::~OAuth2HttpAuthorizer ( )
virtual

Destructor, virtual by default.

Member Function Documentation

bool OpenAB::OAuth2HttpAuthorizer::authorize ( const std::string &  clientId,
const OpenAB::SecureString clientSecret,
const OpenAB::SecureString refreshToken 
)

Obtains new access token, based on provided data.

Parameters
[in]clientIdid of client application
[in]clientSecretsecret of client application
[in]refreshTokenuser refresh token
Returns
true if new access token was obtained successfully, false otherwise.
bool OpenAB::OAuth2HttpAuthorizer::authorizeMessage ( HttpMessage msg)
virtual

Authorizes message.

Parameters
msgmessage to be authorized.
Returns
true if message was authorized successfully, false otherwise.

Implements OpenAB::HttpAuthorizer.


The documentation for this class was generated from the following files: