Skip to content
Markus Binsteiner edited this page Feb 5, 2011 · 4 revisions

sibboleth (Java)

Getting sibboleth

Using maven

To use sibboleth in your Java application, add this repository to your pom.xml (for stable releases):

<distributionManagement>
  <repository>
    <id>releases</id>
    <url>http://dev.ceres.auckland.ac.nz/nexus/content/repositories/releases</url>
  </repository>
</distributionManagement>

or this one (for development releases):

<distributionManagement>
  <repository>
    <id>releases</id>
    <url>http://dev.ceres.auckland.ac.nz/nexus/content/repositories/snapshots</url>
  </repository>
</distributionManagement>

Now, add the dependency:

<dependency>
  <groupId>grith</groupId>
  <artifactId>sibboleth</artifactId>
  <version>0.3</version>
</dependency>

Otherwise...

Download the latest version of sibboleth from here (for a stable release):

http://dev.ceres.auckland.ac.nz/nexus/content/repositories/releases/grith/sibboleth/

or here (for a development release):

http://dev.ceres.auckland.ac.nz/nexus/content/repositories/snapshots/grith/sibboleth/

Libraries ending with -lib contain all dependency libraries.

Examples

How to get a list of all IdPs

import grith.sibboleth.*

System.out.println("Loading list of institutions...");

// we don't need a "real" idp object for just a list of IdPs...
IdpObject idpObj = new DummyIdpObject();
// likewise, we don't need a real credential manager
CredentialManager cm = new DummyCredentialManager();

// here we create the shibboleth object
Shibboleth shib = new Shibboleth(idpObj, cm);
// and fill it with the list of IdPs...
shib.openurl("https://slcs1.arcs.org.au/SLCS/login");

for (String idp : idpObj.getIdps()) {
    System.out.println(idp);
}