org.apache.shindig.auth
Class AnonymousSecurityToken
java.lang.Object
org.apache.shindig.auth.AbstractSecurityToken
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
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AnonymousSecurityToken
public AnonymousSecurityToken()
AnonymousSecurityToken
public AnonymousSecurityToken(String container)
AnonymousSecurityToken
public AnonymousSecurityToken(String container,
long moduleId,
String appUrl,
Long expiresAt)
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.