Giter Site home page Giter Site logo

liboauthcpp's Introduction

What is Sirikata?
-----------------
Sirikata is a BSD licensed open source platform for games and virtual
worlds. We aim to provide a set of libraries and protocols which can
be used to deploy a virtual world, as well as fully featured sample
implementations of services for hosting and deploying these worlds.

Where can I find out more?
--------------------------
The most up to date information can always be found at
http://www.sirikata.com.  The source code is available from GitHub at
http://github.com/sirikata/sirikata/.

liboauthcpp's People

Contributors

catboxparadox avatar danielrh avatar ewencp avatar hatkirby avatar joseexposito avatar jterrace avatar shonfrazier avatar tim-holdaway avatar zlyle avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

liboauthcpp's Issues

Chars to exclude from percent encoding

Hi,

From a Qt client, I'm encoding a URL to be able to make some file operations:
https://github.com/JoseExposito/ubuntuone-qt-files/blob/master/src/com/egg-software/ubuntuone-qt-files/network/AbstractMessage.cpp#L67

For example, to download a file named "(HI).txt" I send a request like this:

https://files.one.ubuntu.com/content/~/Ubuntu%20One/%28HI%29.txt

But I have noticed that the Ubuntu One server returns a "Host requires
authentication" error. To avoid this error I have excluded the chars "("
and ")" from the encoding, and all work as spected with a URL like this:

https://files.one.ubuntu.com/content/~/Ubuntu%20One/(HI).txt

Probably (I'm not sure) the liboauthcpp library is encoding or not some chars to generate the signature, and that is why the Ubuntu One server is returning the "Host requires authentication"

My question is.. Where can I get the full list of chars to exclude from the
encoding?

Thank you very much for the library and the support ๐Ÿ˜„

Duplicate oauth_nonce timestamps on fast requests

The srand call in Client::generateNonceTimeStamp should only be called once. This will prevent duplicate time stamps from being returned.

Something like this should fix it:

static bool initialized = false;
if(!initialized)
{
    srand( time( NULL ) );
    initialized = true;
}

Some suggested fixes for compiling x64 version in Visual Studio 2013

Hi all,
Not sure if this is an active project, but there do seem to have been some changes in the last year since I started using it for accessing QuickBooks Online.

Just downloaded the latest files, and there appears to be a new bug in urlencode.cpp, which can be fixed as follows:
change line 97
from: assert(false && 'Unknown urlencode type');
to: assert(false && "Unknown urlencode type");

Previously, when compiling this library into my applications with Visual Studio 2013, there were a number of warning messages, especially when compiling for x64 version.

Firstly, in both liboauthcpp.cpp, and SHA1.cpp, add the following line at top to avoid "strcpy possible unsafe" warnings:
#define _CRT_SECURE_NO_WARNINGS

The attached text file lists changes which have worked for me to stop warning messages when compiling x64. These mostly seem to relate to converting from size_t (which may be a 64 bit value) to an int (which may be only 32 bit value).

Anyway, submitted for consideration and possible inclusion in future versions.

regards,
Garry.

Mods in liboauthcpp to accomodate x64.txt

doesn't work with imgur

OAuth Verification Failed: Verification of signature failed (signature base string was "GET&https%3A%2F%2Fapi.imgur.com%2Foauth%2Frequest_token&oauth_consumer_key%3Dcb5ae201bac88c3ec7c6cac2f07dd7b10509eb5bb%26oauth_nonce%3D135258652339e%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1352586523%26oauth_version%3D1.0"). with Array ( [0] => 9e55e4b7e3bd34207e290d0c59670101 [1] => [2] => )

it gives me this url
https://api.imgur.com/oauth/request_token?oauth_consumer_key=cb5ae201bac88c3ec7c6cac2f07dd7b10509eb5bb&oauth_nonce=135258652339e&oauth_signature=Q4kxVYhGz%252Fd%252F8WE%252FqpATsDtvcOg%253D&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1352586523&oauth_version=1.0

how to use simple_auth and simple_request

how to use simple_auth and simple_request
This problem appears in simple_auth:
terminate called after throwing an instance of 'OAuth::MissingKeyError'
what(): Couldn't find oauth_token_secret in response Aborted (core dumped).

My John Deere Api does not accept authorization request

I am using this library to access resources as explained in https://colab.research.google.com/github/JohnDeere/DevelopWithDeereNotebooks/blob/master/Onboarding/myjohndeere-api-onboarding.ipynb . In this tutorial they are using requests module from Python. I am able to access resources using Python code. But with liboauth I am able to get verifier. After that server does not accept my request with verifier. It says invalid signature for HMAC_SHA1 method .

CMake does not build an x64 version of the lib

I'd like to build an x64 compatible version for my project (which is x64), but the solution provided by CMake doesn't provide the option. Is there a way to add this functionality to CMake? I'm not very familiar with the tool, unfortunately :(

Beautiful library!

I just stumbled across this library, and I very much agree with this idea that the interface does not provide network services, just pure OAuth functionality - you "BYONI" (Bring Your Own Networking Interface). What do you think about leveraging Beast's HTTP message model to generate complete messages which Beast can send?
https://github.com/vinniefalco/Beast

Thanks!

MinGW/MSYS compilation fails due to wrong compiler parameters being set

Using MinGW in combination with MSYS you have to use the "MSYS Makefiles" generator like this:
$ cd liboauthcpp/build
$ cmake . -G "MSYS Makefiles"
$ make

In the last step it fails because of the following piece of logic in the CMakeFiles.txt (line 36-40):

# Disable some annoying, unnecessary Windows warnings. Enable unwinding for exception handlers.
IF(WIN32)
  ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS -EHsc)
  SET(CMAKE_CXX_FLAGS "-D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS")
ENDIF()

It adds the -EHsc parameter, amongst other things, to the compiler parameters and during make this fails:

$ make
Scanning dependencies of target oauthcpp
[  7%] Building CXX object CMakeFiles/oauthcpp.dir/C_/dev/cpp/libs/liboauthcpp-testing/src/base64.obj
g++.exe: error: unrecognized command line option '-EHsc'
make[2]: *** [CMakeFiles/oauthcpp.dir/C_/dev/cpp/libs/liboauthcpp-testing/src/base64.obj] Error 1
make[1]: *** [CMakeFiles/oauthcpp.dir/all] Error 2
make: *** [all] Error 2

I presume there's some logic missing in order to detect whether it's a Windows platform and using MSVC for the exception settings. When you comment out these lines and run it again everything builds fine.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.