xsul.dsig.saml.authorization
Class CapabilityUtil

java.lang.Object
  extended byxsul.dsig.saml.authorization.CapabilityUtil

public class CapabilityUtil
extends java.lang.Object


Constructor Summary
CapabilityUtil()
           
 
Method Summary
static boolean actionMatch(java.util.Iterator iter, java.util.Vector v)
           
static java.lang.String canonicalizeSubject(java.lang.String subject)
           
static void capability2File(Capability cap, java.lang.String fileloc)
           
static boolean compareSubjects(java.lang.String sub1, java.lang.String sub2)
           
static boolean exist(java.lang.Object obj, java.util.Collection c)
           
static boolean exist(java.lang.Object obj, java.lang.Object[] objs)
           
static boolean exist(java.lang.String handle, Capability[] caps)
           
static SAMLStatement[] getAllStatements(SAMLAssertion sa)
           
static SAMLAuthorizationDecisionStatement[] getAuthorizationDecisionStatements(SAMLAssertion sa)
           
static GlobusCredential getGlobusCredential()
           
static GlobusCredential getGlobusCredential(java.lang.String keyloc, java.lang.String certloc)
           
static java.util.Vector getPermitedOperations(Capability cap)
           
static TrustedCertificates getTrustedCertificates()
           
static TrustedCertificates getTrustedCertificates(java.lang.String cacloc)
           
static Capability locate(java.lang.String handle, java.util.Vector caps)
           
static SAMLAssertion makeAssertion(java.lang.String _nspace, java.lang.String _actionname, java.lang.String _decision, java.lang.String _ePR, java.lang.String _ownername, java.lang.String _username, java.util.Date _notbefore, java.util.Date _notafter, GlobusCredential _cred)
           
static java.util.Collection minus(java.util.Collection a, java.util.Collection b)
           
static java.lang.String[] parse(java.lang.String[] argList, java.lang.String[] argNames, java.lang.String[] defaultValues, boolean[] requiredArgs, java.lang.String usage)
           
static java.lang.String[] parse(java.lang.String[] argList, java.lang.String[] argNames, java.lang.String[] defaultValues, java.lang.String usage)
          Method parse.
static void printDOMNode(org.w3c.dom.Node elem)
           
static java.lang.String textfile2String(java.lang.String fileloc)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CapabilityUtil

public CapabilityUtil()
Method Detail

getAllStatements

public static SAMLStatement[] getAllStatements(SAMLAssertion sa)

getAuthorizationDecisionStatements

public static SAMLAuthorizationDecisionStatement[] getAuthorizationDecisionStatements(SAMLAssertion sa)

actionMatch

public static boolean actionMatch(java.util.Iterator iter,
                                  java.util.Vector v)

printDOMNode

public static void printDOMNode(org.w3c.dom.Node elem)

capability2File

public static void capability2File(Capability cap,
                                   java.lang.String fileloc)

exist

public static boolean exist(java.lang.Object obj,
                            java.util.Collection c)

exist

public static boolean exist(java.lang.String handle,
                            Capability[] caps)

exist

public static boolean exist(java.lang.Object obj,
                            java.lang.Object[] objs)

locate

public static Capability locate(java.lang.String handle,
                                java.util.Vector caps)

minus

public static java.util.Collection minus(java.util.Collection a,
                                         java.util.Collection b)

compareSubjects

public static boolean compareSubjects(java.lang.String sub1,
                                      java.lang.String sub2)

canonicalizeSubject

public static java.lang.String canonicalizeSubject(java.lang.String subject)

makeAssertion

public static SAMLAssertion makeAssertion(java.lang.String _nspace,
                                          java.lang.String _actionname,
                                          java.lang.String _decision,
                                          java.lang.String _ePR,
                                          java.lang.String _ownername,
                                          java.lang.String _username,
                                          java.util.Date _notbefore,
                                          java.util.Date _notafter,
                                          GlobusCredential _cred)
                                   throws java.lang.CloneNotSupportedException,
                                          SAMLException
Throws:
java.lang.CloneNotSupportedException
SAMLException

getTrustedCertificates

public static TrustedCertificates getTrustedCertificates()

getTrustedCertificates

public static TrustedCertificates getTrustedCertificates(java.lang.String cacloc)
                                                  throws CapabilityException
Throws:
CapabilityException

getGlobusCredential

public static GlobusCredential getGlobusCredential()
                                            throws java.lang.Exception
Throws:
java.lang.Exception

getGlobusCredential

public static GlobusCredential getGlobusCredential(java.lang.String keyloc,
                                                   java.lang.String certloc)
                                            throws java.lang.Exception
Throws:
java.lang.Exception

textfile2String

public static java.lang.String textfile2String(java.lang.String fileloc)
                                        throws java.io.IOException
Throws:
java.io.IOException

parse

public static java.lang.String[] parse(java.lang.String[] argList,
                                       java.lang.String[] argNames,
                                       java.lang.String[] defaultValues,
                                       java.lang.String usage)
                                throws java.lang.IllegalArgumentException
Method parse. Parses the list of arguments passed to main and returns values from argument name-value pairs, or their default values if argument not found.

Parameters:
argList - Array of arguments passed to main method
usage - A usage sting to be printed with exception
Returns:
an array of argument values that were found in the argument list, or from defaults
Throws:
java.lang.IllegalArgumentException - if error occurs while parsing arg list

parse

public static java.lang.String[] parse(java.lang.String[] argList,
                                       java.lang.String[] argNames,
                                       java.lang.String[] defaultValues,
                                       boolean[] requiredArgs,
                                       java.lang.String usage)
                                throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException

getPermitedOperations

public static java.util.Vector getPermitedOperations(Capability cap)


IU Extreme! Lab (http://www.extreme.indiana.edu)