You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by Pankaj Arora <pa...@castiron.com> on 2007/08/15 00:57:40 UTC
RE: Kerberos (SPNEGO support)
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:ossfwot@dubioso.net]
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:
httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail:
httpcomponents-dev-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org
RE: Kerberos (SPNEGO support)
Posted by Pankaj Arora <pa...@castiron.com>.
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:sebbaz@gmail.com]
Sent: Saturday, August 18, 2007 4:58 PM
To: httpcomponents-dev@jakarta.apache.org
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 <pa...@castiron.com> 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:ossfwot@dubioso.net]
> 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:
> httpcomponents-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> httpcomponents-dev-help@jakarta.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
httpcomponents-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
httpcomponents-dev-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail:
httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail:
httpcomponents-dev-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org
Fwd: Kerberos (SPNEGO support)
Posted by sebb <se...@gmail.com>.
[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/LoginSample.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 <pa...@castiron.com> 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:ossfwot@dubioso.net]
> 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:
> httpcomponents-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> httpcomponents-dev-help@jakarta.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org