I actually think this is the wrong solution. The code that was failing
before should be fixed to check for the anon token - and this cl should be
reverted.

Is there any reason the code path you mentioned shouldn't know about and be
able to properly handle anon tokens?

- Cassie


On Fri, Sep 5, 2008 at 2:28 PM, <[EMAIL PROTECTED]> wrote:

> Author: johnh
> Date: Fri Sep  5 14:28:17 2008
> New Revision: 692557
>
> URL: http://svn.apache.org/viewvc?rev=692557&view=rev
> Log:
> Returning safe default values from AnonymousSecurityToken rather than
> throwing UnsupportedOperationException. This prevents Shindig run in Full
> mode (which has UrlAuthHandler and AnonymousAuthHandler configured) not to
> barf when direct-rendering a gadget (/gadgets/ifr?url=foo.xml) without a
> security token.
>
>
> Modified:
>
>  
> incubator/shindig/trunk/java/common/src/main/java/org/apache/shindig/auth/AnonymousSecurityToken.java
>
> Modified:
> incubator/shindig/trunk/java/common/src/main/java/org/apache/shindig/auth/AnonymousSecurityToken.java
> URL:
> http://svn.apache.org/viewvc/incubator/shindig/trunk/java/common/src/main/java/org/apache/shindig/auth/AnonymousSecurityToken.java?rev=692557&r1=692556&r2=692557&view=diff
>
> ==============================================================================
> ---
> incubator/shindig/trunk/java/common/src/main/java/org/apache/shindig/auth/AnonymousSecurityToken.java
> (original)
> +++
> incubator/shindig/trunk/java/common/src/main/java/org/apache/shindig/auth/AnonymousSecurityToken.java
> Fri Sep  5 14:28:17 2008
> @@ -32,38 +32,38 @@
>   }
>
>   public String toSerialForm() {
> -    throw new UnsupportedOperationException();
> +    return "";
>   }
>
>   public String getOwnerId() {
> -    throw new UnsupportedOperationException();
> +    return "";
>   }
>
>   public String getViewerId() {
> -    throw new UnsupportedOperationException();
> +    return "";
>   }
>
>   public String getAppId() {
> -    throw new UnsupportedOperationException();
> +    return "";
>   }
>
>   public String getDomain() {
> -    throw new UnsupportedOperationException();
> +    return "";
>   }
>
>   public String getAppUrl() {
> -    throw new UnsupportedOperationException();
> +    return "";
>   }
>
>   public long getModuleId() {
> -    throw new UnsupportedOperationException();
> +    return 0L;
>   }
>
>   public String getUpdatedToken() {
> -    throw new UnsupportedOperationException();
> +    return "";
>   }
>
>   public String getTrustedJson() {
> -    throw new UnsupportedOperationException();
> +    return "";
>   }
>  }
> \ No newline at end of file
>
>
>

Reply via email to