WSFederation and SAML library for Java based web applications
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
src initial commit Jul 25, 2012
.gitignore initial commit Jul 25, 2012
LICENSE.txt initial commit Jul 25, 2012 change readme Jul 25, 2012
pom.xml bump 0.9.0 Jul 26, 2012

This library speaks the WS-Federation protocol and SAML 1.1 and 2.0 tokens. It interops fine with Microsoft-related products like ADFS, Windows Azure Active Directory and Windows Identity Foundation.

The code is a simplified version with some improvements of the library released by Microsoft


Clone it

git clone

Or download it as zip from

Import the Maven that was just downloaded in your project (File -> Import -> Existing Maven Projects)

Add a reference to com.auth10.federation library from your project. Edit your project Maven file pom.xml and add this:


Add a file under resources folder:

federation.trustedissuers.thumbprint=CF50166CE4B....signing cert thumbprint...4DA668F96BF
federation.trustedissuers.friendlyname=My Identity Provider

Add the WSFederationFilter to the web.xml file:

    <!-- this is used only if manual redirect is enabled. Otherwise the user will be automatically redirected to the identity provider when browsing the website -->
    <!-- e.g.: public folder won't be affected by the filter. To add more concat with pipe (|) -->

Consuming user attributes

// gets the user name
String name = request.getRemoteUser();

// gets the user claims
List<Claim> claims = ((FederatedPrincipal)request.getUserPrincipal()).getClaims()