How to make the OAuth 2.0 plugin work on Kong - oauth-2.0

I am new to Kong and microservice. I am using Kong CE version 0.14.1 and I need to secure an existing API through Oauth2.0 plugin.
I tried to follow the instructions in the documentation kong-oauth2-hello-world provided by Kong.
The problem is when I click on the Authorize button, I always get undefined. I don't get the code that provides the token like the documentation.
I think I missed something or I misunderstood the instraction.
Here the environment variables I used by the Node.js application.
Could anyone help me understand the reason why I get undefined ?
Thank you

I just replaced "openweathermap.org" with "mockbin.org" and it works fine

Related

How to install and load OAuth extension to avoid Uncaught Error message

I'm trying to set up OAuth to use between my website and Yahoo Fantasy Sports but getting the error message "Fatal error: Uncaught Error: Class 'OAuth' not found". I'm completely new to OAuth and the process described below is the first time I'm dabbling with this.
I've registered for a Yahoo API key and secret and am using them in this code in PHP to try to set up a basic test connection:
$o = new OAuth( $consumer_key, $consumer_secret,
OAUTH_SIG_METHOD_HMACSHA1,
OAUTH_AUTH_TYPE_URI );
Having searched here, I know I need an OAuth extension and PHPoAuthLib was recommended in another post. I've followed the instructions to install it on the web server via Composer (which basically seemed to be composer require lusitanian/oauth in SSH) but am still getting the "Uncaught Error" message. The php/ext folder on my server is empty and I'm don't know if that is a bad sign.
I've run a phpinfo() file on the server and it does not show oAuth. I've also read that I probably need to load the extension in a php.ini file on my server but I don't know exactly how I would do that for the PHPoAuthLib extension. I tried extension=oauth or extension=oauth.so but didn't seem to work.
Any help would be much appreciated! I'm not wedded to that particular extension (I've also seen a recommendation elsewhere for a Python Yahoo OAuth extension but I know nothing about Python or using 'pip')... I just feel like I'm going around in circles trying to figure out each step.
After trying both PHP and Python OAuth extensions mentioned above, it turned out my web hosting provider prevents custom installations via SSH on shared web hosting for security reasons, but was able to install the HTTP OAuth PEAR module that is available via cPanel to enable OAuth to be used.

What is the cause of the Security Constraints Not Satisfied Error when using sam deploy ---guided?

I am attempting to follow the Hello World example for deploying an AWS Serverless Application, but I get a Security Constraints Not Satisfied Error when using sam deploy --guided. I'm pressing Enter at each prompt to accept the defaults per the tutorial.
The curious bit--to me--is if I use the AWS Toolkit extension for VS Code to deploy the app it works fine, so I don't think it has anything to do with my IAM permission config, but I'm new to this so I'm not ruling it out.
Recently the guided deploy was updated to include a prompt confirming if you were ok with not having any authorization defined. At the same time, a check was added that would fail the guided deploy if you answer 'No'. (See the relevant part of the commit here.)
This means that, as of this commit, you can't go through the AWS Hello World tutorial by responding with Enter to accept the default options.
To successfully deploy from the command line you'll need to confirm 'Yes' that you're ok with not having any authorization defined, and then it should work as expected.
During your sam deploy --guided, at the following question you need to answer YES.
OR
You can do sam deploy which skip that

BrightSpace Valence API getting started issues

I'm attempting to set up and run the basic code sample (python version) found here.
Unfortunately the provided login page fails to resolve (http://lms.valence.desire2learn.com/).
Is there a different sample host I can use to verify my setup?
You are correct; that test host has been retired and replaced by a new one that's associated with the Brightspace Developer Community. To use it, you will need to be a Developer Community member and use a test user provisioned on the new developer environment host.

Implementing xoai 4.x

I would like to implement a standalone oai-pmh version 2 data provider server using xoai 4.1.x without DSpace.
Can anyone direct me to any documentation for doing this or to a reference implementation?
Thanks
David
Its posible, but you will need a repository to manage the contents that oai serve.
You should check https://github.com/lyncode/xoai/wiki for help and https://github.com/lyncode/xoai to get the code.

Facebook Connect SDK not working after the 13th december

I'm struggling with my Facebook Connect after December the 13th.
Here my Facebook.php based on the old PHP SDK 2.0 - hoping someone can point me in the right direction in order to make it functional again.
http://pastebin.com/Mvu1JeZY
I've read that $session is now $user - and params in the JavaScript is now scope.
What else would need to be changed?
Specifically, is this still valid?
http://pastebin.com/8VAv0te5
My JavaScript is getting the login and user correctly. Its my PHP which needs an update.
there was many changes between SDK 2.0 and 3.x.
As I see in your code, you use old cookie function which will not work. There was similar problem here
Some changes and quick fix for them you can find here
You should use the new oauth sdk : http://developers.facebook.com/blog/post/614/

Resources