/*
* Program: SSOServiceProviderImpl2.java
* Purpose: Sample security service provider 2 implementation
* @author Ray Lai (ray.lai@sun.com)
* @version 1.0
* Updated: April 19, 2005, 1:30 PM
* Copyright: (c) 2005 by Sun Microsystems/Ray Lai under Common Development and Distribution License
* Remarks: Full program and documentation will be available under developer.java.net
* For simplicity, logger class is removed.
* =====================================================================================
* Design summary
*
*/
package com.csp.identity;
import com.csp.identity.*;
public class SSOServiceProviderImpl2 implements com.csp.identity.SSOServiceProvider {
protected final String serviceName = "service2";
/**
* Constructor - Creates a new instance of SSOServiceProviderImpl1
*/
public SSOServiceProviderImpl2() {
}
/**
* Create and initialize remote security service.
* Need to pass the SSO context which contains private configuration information.
* Here this assumes that your SSODelegatorFactory implementation has already
* verified the security token or performed necessary authentication/authorization.
*
* @param SSOContext context that contains private config or session info
*/
public void createService(com.csp.identity.SSOContext context) {
// context should contain SSOToken etc
System.out.println("Provider #2: You are now connecting to service2");
// invoke your remote security service provider application
new com.csp.identity.SSOProvider_SampleFunction1();
}
/**
* Close remote security service.
* Here this assumes that your SSODelegatorFactory implementation has already
* verified the security token or performed necessary authentication/authorization.
*/
public void closeService() {
System.out.println("Provider #2: You are now closing service2 connection");
// to be implemented
}
/**
* Reconnect to remote security service.
* Here this assumes that your SSODelegatorFactory implementation has already
* verified the security token or performed necessary authentication/authorization.
*/
public Object reconnect() {
System.out.println("Provider #2: You are now re-connecting service2");
// to be implemented
return null;
}
}