issrg.saml
Class SAMLMetaInfo

java.lang.Object
  extended by issrg.saml.SAMLMetaInfo

public class SAMLMetaInfo
extends java.lang.Object

Author:
Linying Su

Field Summary
static int ENCRYPTEDKEYPAIR
           
static int INTERACTIVE
           
static int KEYPAIR
           
static int KEYSTORE
           
static int PORT
           
static int PROGRAMMABLE
           
static java.lang.String PROTOCOL_NAME
           
static int PROXY
           
static int SELF_QUERY
           
static boolean SIGN_ASSERTION
           
static boolean SIGN_REQUEST
           
static int THIRD_PARTY_QUERY
           
 
Constructor Summary
SAMLMetaInfo()
          Creates a new instance of SAMLMetaInfo
SAMLMetaInfo(java.lang.String configFileName)
          to construct a SAMLMetaInfo object with a configuration file.
 
Method Summary
 java.lang.String[] getAttributeNames()
          this method returns a set of attribute names, which should be included in a query
 int getAuthnMethod()
          this method returns the type of authentication of the SAML client.
 java.lang.String getFilePath()
          this method returns the file path of the SAML web service
 java.lang.String getHost()
          this method returns the host of the SAML web service
 int getLoginMethod()
          this method returns how does the client log in.
 int getPort()
          this method returns the port of the SAML web service
 java.lang.String getProtocol()
          this method returns the protocol name, which the SAML web service is using
 int getQueryType()
          this method returns the query type.
 boolean isSignedAssertion()
          this method returns true if the query is asking a signed assertion.
 boolean isSignedRequest()
          this method returns true if the query itself needs to be signed.
 void load(java.lang.String fileName)
          this method is used to load a config file for setting values to this object
 void setAttributeNames(java.lang.String[] names)
          this method is used to set a set of attribute names, for which the attribute query is.
 void setAuthnMethod(int type)
          this method is used to set the way of the client authenticates to the SAML web service
 void setFilePath(java.lang.String path)
          this method is used to set the file path of the SAML web service
 void setHost(java.lang.String hostIn)
          this method is used to set the host of the SAML web service
 void setLoginMethod(int type)
          this method is used to set the way of the client logs in
 void setPort(int portNum)
          this method is used to set the port of the SAML web service
 void setProtocol(java.lang.String protocolName)
          this method is used to set the protocol name of the SAML web service
 void setQueryType(int query)
          this method is used to set the type of the attribute query
 void setSignedAssertion(boolean sign)
          this method is used to set the query to whether requesting a signed or unsigned assertion
 void setSignedRequest(boolean sign)
          this method is used to tell whether or not the request is signed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SELF_QUERY

public static int SELF_QUERY

THIRD_PARTY_QUERY

public static int THIRD_PARTY_QUERY

PROTOCOL_NAME

public static java.lang.String PROTOCOL_NAME

PORT

public static int PORT

SIGN_ASSERTION

public static boolean SIGN_ASSERTION

SIGN_REQUEST

public static boolean SIGN_REQUEST

KEYSTORE

public static int KEYSTORE

KEYPAIR

public static int KEYPAIR

PROXY

public static int PROXY

ENCRYPTEDKEYPAIR

public static int ENCRYPTEDKEYPAIR

INTERACTIVE

public static int INTERACTIVE

PROGRAMMABLE

public static int PROGRAMMABLE
Constructor Detail

SAMLMetaInfo

public SAMLMetaInfo()
Creates a new instance of SAMLMetaInfo


SAMLMetaInfo

public SAMLMetaInfo(java.lang.String configFileName)
             throws java.lang.Exception
to construct a SAMLMetaInfo object with a configuration file. the configuration file is in the following format. e.g. issrg.saml.meta.type.of.attribute.query=self_query issrg.saml.meta.attribute.names=e-mail, address, organisation issrg.saml.meta.sign.SAML.attribute.assertions=Yes issrg.saml.meta.sign.outgoing.SAML.request=No issrg.saml.meta.login.method=7 issrg.saml.meta.authn.method=3 Each of the entries is optional. The default value will be taken if it is not present in the configuration.

Throws:
java.lang.Exception
Method Detail

load

public void load(java.lang.String fileName)
          throws java.lang.Exception
this method is used to load a config file for setting values to this object

Parameters:
fileName - is the file path
Throws:
java.lang.Exception

getAttributeNames

public java.lang.String[] getAttributeNames()
this method returns a set of attribute names, which should be included in a query


getProtocol

public java.lang.String getProtocol()
this method returns the protocol name, which the SAML web service is using


getHost

public java.lang.String getHost()
this method returns the host of the SAML web service


getPort

public int getPort()
this method returns the port of the SAML web service


getFilePath

public java.lang.String getFilePath()
this method returns the file path of the SAML web service


getQueryType

public int getQueryType()
this method returns the query type. SELF_QUERY = 1; THIRD_PARTY_QUERY = 2;


isSignedAssertion

public boolean isSignedAssertion()
this method returns true if the query is asking a signed assertion. otherwise, the query is for an unsigned assertion.


isSignedRequest

public boolean isSignedRequest()
this method returns true if the query itself needs to be signed. otherwise, the query is not signed.


getAuthnMethod

public int getAuthnMethod()
this method returns the type of authentication of the SAML client. KEYSTORE = 3; KEYPAIR = 4; (two separate files) PROXY = 5; ENCRYPTEDKEYPAIR = 6; (two separate files)


getLoginMethod

public int getLoginMethod()
this method returns how does the client log in. i.e. interactively or programmably. INTERACTIVE = 7; PROGRAMMABLE = 8;


setAttributeNames

public void setAttributeNames(java.lang.String[] names)
this method is used to set a set of attribute names, for which the attribute query is.

Parameters:
names - is an array of names

setProtocol

public void setProtocol(java.lang.String protocolName)
this method is used to set the protocol name of the SAML web service

Parameters:
protocolName - is the protocol name

setHost

public void setHost(java.lang.String hostIn)
this method is used to set the host of the SAML web service

Parameters:
hostIn - is the host name

setFilePath

public void setFilePath(java.lang.String path)
this method is used to set the file path of the SAML web service

Parameters:
path - is the file path

setPort

public void setPort(int portNum)
this method is used to set the port of the SAML web service

Parameters:
portNum - is the port number

setQueryType

public void setQueryType(int query)
this method is used to set the type of the attribute query

Parameters:
query - is query type SELF_QUERY = 1; THIRD_PARTY_QUERY = 2;

setSignedAssertion

public void setSignedAssertion(boolean sign)
this method is used to set the query to whether requesting a signed or unsigned assertion

Parameters:
sign - is true if requesting a signed assertion; otherwise an unsigned assertion

setSignedRequest

public void setSignedRequest(boolean sign)
this method is used to tell whether or not the request is signed.

Parameters:
sign - is true if the request needs to be signed; otherwise not to sign the request

setAuthnMethod

public void setAuthnMethod(int type)
                    throws java.lang.Exception
this method is used to set the way of the client authenticates to the SAML web service

Parameters:
type - is a int value, which tells what files is used to authenticate the client KEYSTORE = 3; KEYPAIR = 4; PROXY = 5; ENCRYPTEDKEYPAIR = 6;
Throws:
java.lang.Exception

setLoginMethod

public void setLoginMethod(int type)
                    throws java.lang.Exception
this method is used to set the way of the client logs in

Parameters:
type - is a int value, which tells whether it logs in interactively or programmably INTERACTIVE = 7; PROGRAMMABLE = 8;
Throws:
java.lang.Exception