SPiD API clients/SDKs

To assist you in integrating with the platform, SPiD provides officially supported API clients/SDKs. The SDKs implement the OAuth communication and token exchanges (including renewing expired tokens etc), as well as automating part of the API call workflow.

There are standard server-side SDKs for PHP, Java and Clojure. Additionally, there is a simpler JavaScript client that is read-only (no OAuth support) and may be used client-side. There are also Android and iOS SDKs.

All SDKs are available on Schibsted's GitHub account.

PHP

To use the PHP SDK, you need to fetch the source code from GitHub:

git clone git://github.com/schibsted/sdk-php.git spid-sdk

There are currently no API docs for the PHP SDK. The Getting started and Implementing Single Sign-On guides will get you off on a flying start. The source code repository also has multiple examples.

Java

The Java API client is available from Maven Central. Add the following to your pom.xml:

<dependency>
    <groupId>no.spid</groupId>
    <artifactId>no.spid.api.client</artifactId>
    <version>1.4</version>
</dependency>

In lieu of API docs, please refer to the Getting started and Implementing Single Sign-On guides for a flying start. There is also a separate repository of examples.

Clojure

The Clojure API client can be installed via Clojars. Add to your project.clj :dependencies:

[spid-client-clojure "1.0.0"]

In lieu of API docs, please refer to the Getting started and Implementing Single Sign-On guides for a flying start. The project Readme has some rudimentary usage information. There is also a separate repository of examples.

JavaScript

The JavaScript SDK is different from the PHP, Java and Clojure ones in that it is read-only, does not use OAuth, and is designed to be used in the browser to query the user's authentication/authorization status.

Source code and distribution files are on Github, refer to the JavaScript SDK page for full API documentation and usage examples.

Documentation and examples ยป

Android

Enables easy SPiD login from Android applications. Supported for Android version 2.2 (API level 8) or greater. Check out the code and include it in your project, then refer to the SDK documentation on getting started, or see the included sample applications.

API documentation and more information is available from the project's wiki.

iOS

Enables easy SPiD login from iOS applications. Check out the code and include it in you project, then refer to the SDK documentation on getting started, or see the included sample applications.

API documentation and more information is available from the project's wiki.

SDKS

See also

Help us improve

Did you spot an error? Or maybe you just have a suggestion for how we can improve? Leave a comment, or better yet, send us a pull request on GitHub to fix it (in-browser editing, only takes a moment).

History of this page

Comments/feedback

Do you have questions, or just want to contribute some newly gained insight? Want to share an example? Please leave a comment. SPiD reads and responds to every question. Additionally, your experience can help others using SPiD, and it can help us continuously improve our documentation.