That won't work for GSS-API. That's only for JAAS. I have written a sample code, wich now works for me. I will contribute that soon.
-----Original Message----- From: sebb [mailto:[EMAIL PROTECTED] Sent: Saturday, August 18, 2007 4:58 PM To: [email protected] Subject: Fwd: Kerberos (SPNEGO support) [Tried to send this earler, but DNS problems caused it to fail] The Sun documentation: http://java.sun.com/j2se/1.4.2/docs/guide/security/jgss/tutorials/LoginS ample.html includes the words: "the TextCallbackHandler class (from the com.sun.security.auth.callback package) as the class to be used when communicating with the user. This class can prompt the user for a user name and password. " HTH On 14/08/07, Pankaj Arora <[EMAIL PROTECTED]> wrote: > Thanks Roland. > That code sample looks good. > But I am facing a problem when I execute it. It prompts me for username > /password and provided correct credentials it does authenticate. > > Is it not possible programmatically to set username/password? > Something similar to a callback Handler in LoginContext in the JAAS > tutorial > referred in the bug. > https://issues.apache.org/jira/browse/HTTPCLIENT-523 > > LoginContext con = null; > > try { > // Create a LoginContext with a callback handler > con = new LoginContext("com.sun.security.jgss.initiate", > callbackHandler); > } > > > I don't see any API call in sun.security.jgss.GSSContextImpl to set any > callback function which may able me to set username/ password > programmatically rather than from a prompt. > My application can not take input from the user. > > Thanks, > Pankaj Arora > > > -----Original Message----- > From: Roland Weber [mailto:[EMAIL PROTECTED] > Sent: Friday, July 06, 2007 5:38 AM > To: HttpComponents Project > Subject: Re: Kerberos (SPNEGO support) > > Hello Pankaj, > > I believe it is possible: > https://issues.apache.org/jira/browse/HTTPCLIENT-523 > > The Subversion repository has recently moved, the code is now at: > http://svn.apache.org/repos/asf/jakarta/httpcomponents/oac.hc3x/trunk/sr > c/contrib/org/apache/commons/httpclient/contrib/auth/ > > hope that helps, > Roland > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
