• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: 401 Authorization explained
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 401 Authorization explained


  • Subject: Re: 401 Authorization explained
  • From: Daniele Corti <email@hidden>
  • Date: Tue, 10 Apr 2012 20:29:08 +0200

Hi

2012/4/10 Chuck Hill <email@hidden>
String originalURLFromRequest = request.headerForKey("request_uri");

is it so easy? I thought it was more complicated... 
 
Thank you Chuck!

On 2012-04-10, at 10:26 AM, Daniele Corti wrote:

> Hi Everyone,
> I was wondering, if I use the ErrorDocument in Apache for the 401 to redirect on a direct action (for example ErrorDocument 401 /cgi-bin/WebObjects/wa/requireLogon ), is there a way in WO to obtain the URI that cause the Authentication Error?
> In PHP you can use the $_SERVER['REQUEST_URI'] variable. Is there something like this in WO?
>
> Thanks in advance!
> --
> Daniele Corti
> --
> I DON'T DoubleClick
>
>
> 2012/4/10 Johann Werner <email@hidden>
> Hi Klaus,
>
> nice article but you can achieve that with less work (or files). Instead of an "empty" component you could just create an empty response object and return that in your direct action:
>
> […]
> if (noAuthenticationFound) {
>   ERXResponse authRequired = new ERXResponse();
>   authRequired.setStatus(401);
>   authRequired.setHeader("Basic realm=\"Videos\"", "WWW-Authenticate");
>   if (origin != null)
>     authRequired.setHeader(origin, "Access-Control-Allow-Origin");
>   return authRequired;
> } else {
>   […]
> }
>
>
> Am 07.04.2012 um 19:38 schrieb Klaus Berkling:
>
>> Is this useful:
>>
>> http://www.berkling.us/theothersite/page1/files/401_authorization_in_wonder.html
>>
>> It covers how 401 Authorization can be done in Wonder/WebObjects.
>>
>>
>>
>> kib
>>
>> "The trouble with normal is it always gets worse."
>> Bruce Cockburn
>>
>> Klaus Berkling
>> Web Application Dev. & Systems Analyst
>> DynEd International, Inc.
>> www.dyned.com
>
>
>  _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden

--
Chuck Hill             Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/gvc/practical_webobjects



--
Daniele Corti
--
I DON'T DoubleClick

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >401 Authorization explained (From: Klaus Berkling <email@hidden>)
 >Re: 401 Authorization explained (From: Johann Werner <email@hidden>)
 >Re: 401 Authorization explained (From: Daniele Corti <email@hidden>)

  • Prev by Date: Re: preventing direct component access
  • Next by Date: Re: preventing direct component access
  • Previous by thread: Re: 401 Authorization explained
  • Next by thread: Re: New Framework on the way
  • Index(es):
    • Date
    • Thread