You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by Lalit Sahoo <la...@sonata-software.com> on 2007/04/18 11:16:51 UTC

How to retrieve AuthScope details

Hi All,

 

I am creating an instance of AuthScope by using following constructor:

 

new AuthScope (hostName, port, newRealm, newAuthScheme);

 

And then setting this AuthScope on HttpState by using following
statement:

 

httpState.setCredentials (authScope, userCredentials);

 

I want to retrieve the AuthScope details from HttpState.

 

How can I achieve this?

 

Can anybody help me in this regard?

 

Regards,

Lalit

 

 

 

 

 


RE: How to retrieve AuthScope details

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Wed, 2007-04-18 at 15:06 +0530, Lalit Sahoo wrote:
> Hi Oleg,
> 
> I have already set the credentials for HttpState as explained in
> previous mail.
> 
> In some other place I want to check the credential details for
> HttpState.
> 
> In this regard I have to use httpState.getCredentials (AuthScope auth).
> 
> That's why I would like to know how I can retrieve AuthScope details for
> HttpState.Then I will use the same AuthScope details to retrieve
> credentials.
> 

There is currently no way to enumerate available credentials and their
respective auth scopes. You should consider keeping a reference to the
AuthScope instance in the application layer. You may also want to
consider submitting a patch that adds a means to enumerate credentials /
auth scopes.

Oleg



> Regards,
> Lalit
> 
> -----Original Message-----
> From: Oleg Kalnichevski [mailto:olegk@apache.org] 
> Sent: Wednesday, April 18, 2007 2:57 PM
> To: HttpClient User Discussion
> Subject: Re: How to retrieve AuthScope details
> 
> On Wed, 2007-04-18 at 14:46 +0530, Lalit Sahoo wrote:
> > Hi All,
> > 
> >  
> > 
> > I am creating an instance of AuthScope by using following constructor:
> > 
> >  
> > 
> > new AuthScope (hostName, port, newRealm, newAuthScheme);
> > 
> >  
> > 
> > And then setting this AuthScope on HttpState by using following
> > statement:
> > 
> >  
> > 
> > httpState.setCredentials (authScope, userCredentials);
> > 
> >  
> > 
> > I want to retrieve the AuthScope details from HttpState.
> > 
> >  
> > 
> > How can I achieve this?
> > 
> 
> Lalit,
> 
> I am not sure I understand what exactly you are trying to do. Are you
> trying to enumerate all credentials available in HttpState?
> 
> Oleg
> 
> 
> >  
> > 
> > Can anybody help me in this regard?
> > 
> >  
> > 
> > Regards,
> > 
> > Lalit
> > 
> >  
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org


RE: How to retrieve AuthScope details

Posted by Lalit Sahoo <la...@sonata-software.com>.
Hi Oleg,

I have already set the credentials for HttpState as explained in
previous mail.

In some other place I want to check the credential details for
HttpState.

In this regard I have to use httpState.getCredentials (AuthScope auth).

That's why I would like to know how I can retrieve AuthScope details for
HttpState.Then I will use the same AuthScope details to retrieve
credentials.

Regards,
Lalit

-----Original Message-----
From: Oleg Kalnichevski [mailto:olegk@apache.org] 
Sent: Wednesday, April 18, 2007 2:57 PM
To: HttpClient User Discussion
Subject: Re: How to retrieve AuthScope details

On Wed, 2007-04-18 at 14:46 +0530, Lalit Sahoo wrote:
> Hi All,
> 
>  
> 
> I am creating an instance of AuthScope by using following constructor:
> 
>  
> 
> new AuthScope (hostName, port, newRealm, newAuthScheme);
> 
>  
> 
> And then setting this AuthScope on HttpState by using following
> statement:
> 
>  
> 
> httpState.setCredentials (authScope, userCredentials);
> 
>  
> 
> I want to retrieve the AuthScope details from HttpState.
> 
>  
> 
> How can I achieve this?
> 

Lalit,

I am not sure I understand what exactly you are trying to do. Are you
trying to enumerate all credentials available in HttpState?

Oleg


>  
> 
> Can anybody help me in this regard?
> 
>  
> 
> Regards,
> 
> Lalit
> 
>  
> 
> 
> 
> 
> 
> 
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org


Re: How to retrieve AuthScope details

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Wed, 2007-04-18 at 14:46 +0530, Lalit Sahoo wrote:
> Hi All,
> 
>  
> 
> I am creating an instance of AuthScope by using following constructor:
> 
>  
> 
> new AuthScope (hostName, port, newRealm, newAuthScheme);
> 
>  
> 
> And then setting this AuthScope on HttpState by using following
> statement:
> 
>  
> 
> httpState.setCredentials (authScope, userCredentials);
> 
>  
> 
> I want to retrieve the AuthScope details from HttpState.
> 
>  
> 
> How can I achieve this?
> 

Lalit,

I am not sure I understand what exactly you are trying to do. Are you
trying to enumerate all credentials available in HttpState?

Oleg


>  
> 
> Can anybody help me in this regard?
> 
>  
> 
> Regards,
> 
> Lalit
> 
>  
> 
> 
> 
> 
> 
> 
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org