org.apache.shindig.auth
Class AnonymousSecurityToken

java.lang.Object
  extended by org.apache.shindig.auth.AbstractSecurityToken
      extended by org.apache.shindig.auth.AnonymousSecurityToken
All Implemented Interfaces:
SecurityToken

public class AnonymousSecurityToken
extends AbstractSecurityToken
implements SecurityToken

A special class of Token representing the anonymous viewer/owner


Constructor Summary
AnonymousSecurityToken()
           
AnonymousSecurityToken(String container)
           
AnonymousSecurityToken(String container, long moduleId, String appUrl, Long expiresAt)
           
 
Method Summary
 String getAppId()
           
 String getAppUrl()
           
 String getAuthenticationMode()
           
 String getContainer()
           
 String getDomain()
           
 Long getExpiresAt()
           
 long getModuleId()
           
 String getOwnerId()
           
 String getTrustedJson()
           
 String getUpdatedToken()
           
 String getViewerId()
           
 boolean isAnonymous()
           
 
Methods inherited from class org.apache.shindig.auth.AbstractSecurityToken
getActiveUrl, isExpired
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.shindig.auth.SecurityToken
getActiveUrl, isExpired
 

Constructor Detail

AnonymousSecurityToken

public AnonymousSecurityToken()

AnonymousSecurityToken

public AnonymousSecurityToken(String container)

AnonymousSecurityToken

public AnonymousSecurityToken(String container,
                              long moduleId,
                              String appUrl,
                              Long expiresAt)
Method Detail

isAnonymous

public boolean isAnonymous()
Specified by:
isAnonymous in interface SecurityToken
Returns:
true if the token is for an anonymous viewer/owner

getOwnerId

public String getOwnerId()
Specified by:
getOwnerId in interface SecurityToken
Returns:
the owner from the token, or null if there is none.

getViewerId

public String getViewerId()
Specified by:
getViewerId in interface SecurityToken
Returns:
the viewer from the token, or null if there is none.

getAppId

public String getAppId()
Specified by:
getAppId in interface SecurityToken
Returns:
the application id from the token, or null if there is none.

getDomain

public String getDomain()
Specified by:
getDomain in interface SecurityToken
Returns:
the domain from the token, or null if there is none.

getContainer

public String getContainer()
Specified by:
getContainer in interface SecurityToken
Returns:
The container.

getAppUrl

public String getAppUrl()
Specified by:
getAppUrl in interface SecurityToken
Returns:
the URL of the application

getModuleId

public long getModuleId()
Specified by:
getModuleId in interface SecurityToken
Returns:
the module ID of the application

getExpiresAt

public Long getExpiresAt()
Specified by:
getExpiresAt in interface SecurityToken
Returns:
the timestamp that this token expires or null if unknown or indeterminate

getUpdatedToken

public String getUpdatedToken()
Specified by:
getUpdatedToken in interface SecurityToken
Returns:
an updated version of the token to return to the gadget, or null if there is no need to update the token.

getAuthenticationMode

public String getAuthenticationMode()
Specified by:
getAuthenticationMode in interface SecurityToken
Returns:
the authentication mechanism used to generate this security token
See Also:
AuthenticationMode

getTrustedJson

public String getTrustedJson()
Specified by:
getTrustedJson in interface SecurityToken
Returns:
a string formatted JSON object from the container, or null if there is no JSON from the container.


Copyright © 2007-2012. All Rights Reserved.