Does the balanced python client library support authentication? - django

I'm using django.
I've tried a lot of different things including urllib2, but I can't seem to create customers. I receive a 401 error.
If not how can I authenticate, and still use things like Customer().save()?
thanks
c

Have you looked at https://github.com/balanced/balanced-django as an example to see how that library is doing it? I lack details as to if you're using the Balanced Python library (https://github.com/balanced/balanced-python) or something else. If you are using that library, make sure your API secret is making it down into something like balanced.configure which sets up the client library authentication. For example, balanced.configure('ak-test-1kvvievk0Qqw5wQPsrlM9g7wQwNe62cyf').
Also, feel free to stop by #balanced on Freenode IRC if you'd like to get some help directly from Balanced developers who assist with integration.

Related

Authlib vs OAuthlib: Are these libraries the same?

I am a beginner in the world of the OAuth2.0 and OpenID Protocols. I would like to implement a custom server - provider for multiple applications. So, to use it for Single Sign-On (SSO). I would like to work with python. Till now I have found four packages, for an OAuth2.0 and an OpenID Connect server implementation, in Python: pyoidc, django-oidc-provider, Django OAuth Toolkit (DOT) by OAuthlib and Authlib. I tried to read and understand pyoidc, but it was not so helpful and easy, basic things were missing. I have tried django-oidc-provider and I was really satisfied, and the whole implementation was really easy. So, after those trials, I am left with Django OAuth Toolkit (by OAuthlib) and Authlib. Has anyone tried them? Are these packages the same? Is Authlib an updated version of the OAuthlib library? The only information I know till now, is that Flask-OAuthlib is deprecated, and Authlib is was its new version.
*Every answer or advice or personal experience would be really helpful and always appreciated!
Thank you again for your help.
After some research, I concluded to work generally with JWTs. As before, I would like to work with a GraphQL API, so I am searching for solutions about JWT authentication on it. I maybe use Passport.js (passport-jwt) or something else for Python. All the libraries mentioned above possibly will be not used.
I will just redirect the user to my main application, authenticate them with JWT, and then return the JWT back to the application. In the future and after deployment, I might also implement an OAuth2.0 provider for my website. Although those packages did not really help me, I would recommend Django OAuth Toolkit (DOT) and django-oidc-provider to others. But, also I learned that django-oidc-provider only supports the implementation of a small and simple OAuth2.0 provider. Django OAuth Toolkit comes with lots of options for implementing an advanced OAuth2.0 Authentication Server (AS), including Authorization Code flow with PKCE (Proof Key with Code Exchange), which is the most secure flow. It is also scalable and has great documentation with lots of customizations if you want.
*I sent an email to the support of Authlib, and of course no one has answered to me after a week.

How can I find what services are offered in a WSDL file?

I am a SOAP/WebServices newbie, and have been given a WSDL file that has a bunch of web services that I can connect to.
What is the easiest way to parse this and show me what services are offered, and what the input and output parameters are that are required? I really don't want anything more than this, but for whatever reason I can't seem to google an answer.
The closest I've gotten is using wsdl2java from Apache Axis, however it creates a whole bunch of Java objects. What I really want is very basic, which is give me a list of all of the services available, and the input/output parameters.
Does such a thing exist or do I need to build this myself?
Without installing anything I suppose this link would work but it requires that your WSDL be web accessible...
http://www.validwsdl.com/
Other online parsers may be better. Personally I'd recommend installing Eclipse with the web services plugin or the demo version of SOAPSonar, but if you only need to peek at what a WSDL offers without having to dig through the XML, then the above link might be an acceptable option.

Django: Connecting to an API (Oauth)

I want my Django application to connect to an application called Buffer. I've previously connected directly to Twitter using the python-twitter library (http://code.google.com/p/python-twitter/), but I'd like to post to more platforms simultaneously, therefore Buffer seems to fit my needs.
However, I have no clue how to achieve this. I've googled around a bit and figured that I need to create an oAuth Client (or some call it Consumer?), but that's basically where I'm at.
My question is therefore as follows:
Where do I start to connect to Buffer using oAuth?
Is there a library that does the work for me, like the python-twitter library? Or do I need to start from scratch? And if that's the case, some guidance is needed.
I recently had to interface with a API and had no trouble using oauth2. pydanny's post gives you an overview, and some background on why your decision might be harder than anticipated.

ColdFusion/OAuth/Twitter API

I'm trying to integrate with Twitter using their OAuth API. I have downloaded and tried the CF implementation here: http://oauth.riaforge.org/ with no success. Anyone have a simple CF to Twitter OAuth example for authorizing a user, getting a token, and using it?
ColdFusion plays really nice with java. What I did is simply use the twitter4j lib (http://yusuke.homeip.net/twitter4j/en/index.html#introduction) to handle everything. Works like a charm, and is far more comprehensive that you'd ever dream of writing yourself. Plus, it's free.
I'd try that before I went banging my head against the wall trying to deal with signing oauth requests and reinventing the wheel.
checkout this post my colleague wrote - the twitter 4j library recently change in the 2.2 update and the class is now an interface, so you have to modify the code a bit...
http://techblog.troywebconsulting.com/2011/09/authenticating-to-twitter-using-oauth-and-twitter4j-2-2x-api-with-coldfusion/
Could try this one, but I didn't try it myself yet to know if it works any better than the one on RIA Forge. I just found it while digging around.
http://oauth.googlecode.com/svn/code/coldfusion/
It looks like RPX also supports OAuth, but again, I haven't tried it personally. I am using them for an OpenID implementation, and they work great.
https://rpxnow.com/docs

Problems with home-brew web crawler

I have built a webcrawler in C++. I am using an API called URLdownloadToFile().
Is there any other API that can be used?
The API URLdownloadToFile() is working well for some URLs and it is not working well for some other URLs? Please suggest some ways I can overcome this problem?
Thanks,
Dnyaneshwari C.
You might want to look into libcurl which should allow you to pull content using a variety of protocols. This should also support proxies etc which might be what is giving you problems with specific urls. See also; http://curl.haxx.se/
You might want to look at WinINet which is a simple C API for high-level interface with the HTTP network stack. Another option is WinHttp which is somewhat more compilcated and requires you do deal with COM.
Unless there is a particular reason for sticking with c++ you could well be better off switching to Python and using BeautifulSoup. I've used curl, and it is nice, but all my web stuff is done in Python now