Using dptool to experiment with Dataporten API Gatekeeper

Ensure that you are running dptool version >= 1.8.

Register a client using Dataporten Dashboard, and add http://127.0.0.1:12012/callback as a valid redirect_uri.

Configure your client with dptool with a specific configuration name, in this case jwt.

Continue reading

Posted in Dataporten | Leave a comment

HTTPjs – a new API debugging, prototyping and test tool

Today, we released a new API debugging, prototyping and test tool that is available at:

When you arrive at the site, you’ll immediately be delegated a separate sub domain, such as http://f12.http.net. This subdomain is now ready to receive any kind of HTTP requests. At the site, you get a javascript editor window, where you can prototype the server side of the API server.

All requests sent to your new domain, will be processed in your browser with your custom javascript implementation. The web site will display the full HTTP log for you to inspect.

This tool is very useful for rapid development, and testing of API clients. In example, you may select a template OAuth Server implementation to start from, then attempt to return variations, invalid responses and similar to inspect how your client behaves.

The tool was made possible with Node.js, Websockets with Socket.io, Expressjs, requirejs, Grunt, Bower.io, nconf, select2, ace, bootstrap, momentjs, highlightjs.

Posted in Javascript, OAuth, UWAP | Tagged , , , , , , , , , , , , | Comments Off on HTTPjs – a new API debugging, prototyping and test tool

API Authorization as a Service

Authentication and authorization with APIs are slightly more complex than with traditional access to web sites. The client is typically more intelligent, it being a javascript web application or a mobile native app; and communicates with a backend using an API. APIs typically also are exposed to third party app developers that may obtain access by both authenticating the third party client and the end user using it. This three-tier trust model is often referred to as “delegated authorization”.

Read more

Results from most of my current work will be primarily published on the blog.uwap.org blog.

Posted in UWAP | Comments Off on API Authorization as a Service

UNINETT WebApp Park Architecture

Here is a short description of the UNINETT WebApp Park Architecture.

Posted in Groups, OAuth, UWAP | Comments Off on UNINETT WebApp Park Architecture

Announcing UNINETT WebApp Park

I’ve spent a few months working on a prototype of UNINETT WebApp Park. The UNINETT WebApp Park is a simple, scalable, efficient and secure ecosystem for rapid development of modern web applications for higher education. I’ve created a 20 minutes walk-through video of the prototype. This is just the beginning, and I’ve got a bunch of ideas of further work on the platform. If you take the time to watch it, I really appreciate it, thanks!

I really appreciate feedback. Thanks.

Posted in UWAP | Comments Off on Announcing UNINETT WebApp Park

Serbian translation of SimpleSAMLphp

SimpleSAMLphp is now translated to Serbian. Thanks a lot to the Serbian team!

The translation is committed to trunk, and will be part of the upcoming 1.10 release.

Posted in SimpleSAMLphp | Comments Off on Serbian translation of SimpleSAMLphp

Announcing New Sparkling SAML 2.0 Debugger

I’ve done a rewrite of the old webbased SAML 2.0 debugger, which will help you to decode the various SAML bindings for easier debugging SAML messages.

I hope you like it.

This tool is part of the Federation Lab suite of test, validation and debugging tools for Identity protocols, such as SAML and OpenID Connect. Please contact me about any problems or bugs with the tool.

You may also be interested in the SAML-tracer Firefox Plugin.

Posted in Federation Lab, GN3 Identity Federations | Comments Off on Announcing New Sparkling SAML 2.0 Debugger

OpenID Connect Federations

I’ve done another take on OpenID Connect Federations based upon the current implementors draft of OpenID Connect 1.0.

Here is the idea:

Posted in GN3 Identity Federations, IdP Discovery, OpenID Connect | 1 Comment

Announcing online JWT Debugger tool

JSON Web Token (JWT) is a really nice IETF spec for encoding, signing and encrypting a set of claims using JSON. JWT is a standalone spec that is already used several places, but is also an essential part of the emerging OpenID Connect.

Today I’m anonuncing a online JWT debugger tool that allows you to decode and encode JWTs. This tool is part of the Federation Lab test and debugging suite for identity protocols. The Federation Lab also contains testing tools for OpenID Connect and SAML.

This is considered a beta version, and I’ve not quality controlled the output. The tool is also currently limited to the HS256 algoritm, but if people like the tool we may add more algoritms. Please give feedback if the tool does not work as expected or you have feature requests.

Posted in Federation Lab, GN3 Identity Federations, IETF, Javascript, OpenID Connect | Comments Off on Announcing online JWT Debugger tool

This document is also the README-Phonegap.md of the JSO library.

Using JSO with Phonegap and ChildBrowser

Using JSO to perform OAuth 2.0 authorization in WebApps running on mobile devices in hybrid environment is an important deployment scenario for JSO.

Here is a detailed instruction on setting up JSO with Phonegap for iOS and configure OAuth 2.0 with Google. You may use it with Facebook or other OAuth providers as well.

Preparations

Setup App

To create a new App

./create  /Users/andreas/Sites/cordovatest no.erlang.test "CordovaJSOTest"

Install ChildBrowser

The original ChildBrowser plugin is available here.

However, it is not compatible with Cordova 2.0. Instead, you may use this fork of ChildBrowser which should be working with Cordova 2.0:

What you need to do is to copy these files:

in to your WebApp project area, by using drag and drop into the Plugins folder in XCode.

Now you need to edit the file found in Resources/Cordova.plist found in your WebApp project area.

In this file you need to add one array entry with ‘*’ into ExternalHosts, and two entries into Plugins:

  • ChildBrowser -> ChildBrowser.js
  • ChildBrowserCommand -> ChildBrowserCommand

as seen on the screenshot.

Setting up your WebApp with ChildBrowser

I’d suggest to test and verify that you get ChildBrowser working before moving on to the OAuth stuff.

In your index.html file try this, and verify using the Simulator.

<script type="text/javascript" charset="utf-8" src="cordova-2.0.0.js"></script>
<script type="text/javascript" charset="utf-8" src="ChildBrowser.js"></script>
<script type="text/javascript">

    var deviceready = function() {
        if(window.plugins.childBrowser == null) {
            ChildBrowser.install();
        }
        window.plugins.childBrowser.showWebPage("http://google.com");
    };

    document.addEventListener('deviceready', this.deviceready, false);

</script>

Setting up JSO

Download the latest version of JSO:

The documentation on JSO is available there as well.

The callback URL needs to point somewhere, and one approach would be to put a callback HTML page somewhere, it does not really matter where, although a host you trust. And put a pretty blank page there:

<!doctype html>
<html>
    <head>
        <title>OAuth Callback endpoint</title>
        <meta charset="utf-8" />
    </head>
    <body>
        Processing OAuth response...
    </body>
</html>

Now, setup your application index page. Here is a working example:

<script type="text/javascript" charset="utf-8" src="cordova-2.0.0.js"></script>
<script type="text/javascript" charset="utf-8" src="ChildBrowser.js"></script>
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="jso/jso.js"></script>
<script type="text/javascript">

    var deviceready = function() {

        /*
         * Setup and install the ChildBrowser plugin to Phongap/Cordova.
         */
        if(window.plugins.childBrowser == null) {
            ChildBrowser.install();
        }

        // Use ChildBrowser instead of redirecting the main page.
        jso_registerRedirectHandler(window.plugins.childBrowser.showWebPage);

        /*
         * Register a handler on the childbrowser that detects redirects and
         * lets JSO to detect incomming OAuth responses and deal with the content.
         */
        window.plugins.childBrowser.onLocationChange = function(url){
            url = decodeURIComponent(url);
            console.log("Checking location: " + url);
            jso_checkfortoken('facebook', url, function() {
                console.log("Closing child browser, because a valid response was detected.");
                window.plugins.childBrowser.close();
            });
        };

        /*
         * Configure the OAuth providers to use.
         */
        jso_configure({
            "facebook": {
                client_id: "myclientid",
                redirect_uri: "https://myhost.org/callback.html",
                authorization: "https://www.facebook.com/dialog/oauth",
                presenttoken: "qs"
            }
        });

        // For debugging purposes you can wipe existing cached tokens...
        // jso_wipe();
        jso_dump();

        // Perform the protected OAuth calls.
        $.oajax({
            url: "https://graph.facebook.com/me/home",
            jso_provider: "facebook",
            jso_scopes: ["read_stream"],
            jso_allowia: true,
            dataType: 'json',
            success: function(data) {
                console.log("Response (facebook):");
                console.log(data);
            }
        });

    };

    document.addEventListener('deviceready', this.deviceready, false);

</script>
Posted on by Andreas Solberg | Comments Off on OAuth 2.0 with Phonegap + ChildBrowser using the JSO library