views:

35

answers:

0

I'm trying to write a client for consuming DFS (Documentum Foundation Services) and trying to use kerberos for single sign-on. In both Java and C# sample code (productivity layer) that comes with the documentation, the line that gets the Kerberos binary token is given as

byte[] ticket = ...

I'm not sure how to actually get the binary token and the "..." does not help me. Anyone out there have a clue on how to get an actual ticket (Kerberos token) using either Java or C#???

Thanks!!!!

Here are the examples given for both Java and C#:

Java: Invoking a service with Kerberos authentication

KerberosTokenHandler handler = new KerberosTokenHandler();
IObjectService service = ServiceFactory
.getInstance().getRemoteService(..., contextRoot, Arrays.asList((Handler) handler));
byte[] ticket = ...;
handler.setBinarySecurityToken(
new KerberosBinarySecurityToken(ticket, KerberosValueType.KERBEROSV5_AP_REQ));
service.create(...)

C#: Invoking a service with Kerberos authentication

KerberosTokenHandler handler = new KerberosTokenHandler();
List<IEndpointBehavior> handlers = new List<IEndpointBehavior>();
handlers.Add(handler);
IObjectService service = ServiceFactory
.Instance.GetRemoteService<IObjectService>(..., contextRoot, handlers);
byte[] ticket = ...;
handler.SetBinarySecurityToken(
new KerberosBinarySecurityToken(ticket, KerberosValueType.GSS_KERBEROSV5_AP_REQ));
service.create(...);