org.kth.pdc.grid.utility
Class AssertionGenerator

java.lang.Object
  extended by org.kth.pdc.grid.utility.AssertionGenerator

public class AssertionGenerator
extends Object

Generates a SAML Assertion


Constructor Summary
AssertionGenerator()
          Constructor
 
Method Summary
 org.opensaml.SAMLAuthenticationStatement createAuthStat(org.opensaml.SAMLSubject userSubject, Date time)
           
 org.opensaml.SAMLSubject createSubject(String realmName, String userName, PublicKey subjectpk)
           
 int getLifetime()
          Get the life time
 org.opensaml.SAMLAssertion makeAssertion(String realmName, String userName, Date maxTime, String issuer, byte[] inUserCert, byte[] inUserKey, String pwd, PublicKey subjectpk)
          Creates a SAML Assertion from the specified User, signed with the key material given as parameters if any
 void setLifetime(int hours)
          Set the life time
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AssertionGenerator

public AssertionGenerator()
Constructor

Method Detail

setLifetime

public void setLifetime(int hours)
Set the life time

Parameters:
hours - life time of the SAML Assertion (Should be > 0)

getLifetime

public int getLifetime()
Get the life time

Parameters:
hours - life time of the SAML Assertion

makeAssertion

public org.opensaml.SAMLAssertion makeAssertion(String realmName,
                                                String userName,
                                                Date maxTime,
                                                String issuer,
                                                byte[] inUserCert,
                                                byte[] inUserKey,
                                                String pwd,
                                                PublicKey subjectpk)
Creates a SAML Assertion from the specified User, signed with the key material given as parameters if any

Parameters:
realmName - Kerberos Domain Name
userName - User Kerberos Name
maxTime - Time after that the assertion must not be valid
issuer - Issuer identifier
inUserCert - Issuer certificate (if null it is not included in the assertion)
inUserKey - Issuer privateKey (if null the Assertion is not signed). It has to be a RSA private Key.
pwd - Issuer password
Returns:
the (possibly signed) SAML Assertion with the Statements for the input user

createSubject

public org.opensaml.SAMLSubject createSubject(String realmName,
                                              String userName,
                                              PublicKey subjectpk)

createAuthStat

public org.opensaml.SAMLAuthenticationStatement createAuthStat(org.opensaml.SAMLSubject userSubject,
                                                               Date time)


Copyright © 2001-2008 University of Southampton IT Innovation Centre. All Rights Reserved.