12.07.2015 Views

CA eTrust SiteMinder Developer's Guide for Java

CA eTrust SiteMinder Developer's Guide for Java

CA eTrust SiteMinder Developer's Guide for Java

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Java</strong> API FlowIf you do not already have a default connection but you want a user-definedconnection object, you can use the Agent API to create the agent object andthen create the new connection, as follows:1. Create the agent object.You can create an agent object based on connection parameters fromeither of the following sources:■User-defined connection parameters defined in your code—<strong>for</strong>example:AgentAPI agent = new AgentAPI();ServerDef sd = new ServerDef();sd.serverIpAddress = POLICY_IP;sd.connectionMin = CX_MIN;sd.connectionMax = CX_MAX;sd.connectionStep = CX_STEP;sd.timeout = CX_TIMEOUT;sd.authorizationPort = AZ_PORT;sd.authenticationPort = AUTH_PORT;sd.accountingPort = ACC_PORT;InitDef init=new InitDef(AGENT_LOGIN,SHARED_SECRET,false, sd);agent.init(init);Note: With <strong>SiteMinder</strong> v6.0 and later, the authorization, authentication,and accounting servers are combined into a single server process.Consequently, authorizationPort, authenticationPort, and accountingPortcan all be set to the same value.■Connection parameters stored in an Agent configuration file(WebAgent.conf or LocalConfig.conf). For example, the following codeestablishes a connection on a Netscape server:AgentAPI agent = new AgentAPI();InitDef init = new InitDef();agent.getConfig(init, "myagent","/opt/netscape/server4/https-smdev/config/WebAgent.conf");agent.init(init);Note: An Agent configuration file <strong>for</strong> a v5QMRx or v6.x agent containsdifferent in<strong>for</strong>mation than an Agent configuration file <strong>for</strong> a v4QMRx agent.20 <strong>Developer's</strong> <strong>Guide</strong> <strong>for</strong> <strong>Java</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!