|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.dyuproject.openid.OpenIdUser
public final class OpenIdUser
The openid user where the identity, claimedId and association metadata are persisted.
Field Summary | |
---|---|
static String |
ATTR_NAME
|
Constructor Summary | |
---|---|
OpenIdUser()
|
Method Summary | |
---|---|
void |
addExtension(String namespace,
String alias)
Adds an extension mapping for this user's openid provider if this extension truly is available on the user's openid provider. |
void |
fromJSON(Map map)
|
Map<String,Object> |
getA()
Shorthand for getAttributes() , which is convenient for views/templates. |
String |
getAssocHandle()
Gets the handle/key for the openid associated. |
Object |
getAttribute(String name)
Gets the custom, persistent attribute mapped to the given key . |
Map<String,Object> |
getAttributes()
Gets the custom attributes that was peristed across different http requests. |
String |
getClaimedId()
Gets the claimed id of the user. |
String |
getExtension(String namespace)
Gets the alias of the extension mapped with the given namespace . |
Map<String,String> |
getExtensions()
Gets the extensions added to this user's openid provider. |
String |
getIdentifier()
Gets the raw identifier (openid_identifier) supplied on the login form. |
String |
getIdentity()
Gets the user's openid identity. |
String |
getOpenIdDelegate()
Gets the user's local id |
String |
getOpenIdServer()
Gets the user's openid server. |
boolean |
isAssociated()
Checks whether this user is already associated with his openid provider. |
boolean |
isAuthenticated()
Checks whether this user is already authenticated. |
static OpenIdUser |
populate(OpenIdUser user)
Populate/clone the provided user . |
static OpenIdUser |
populate(String identifier,
String claimedId,
String openIdServer)
Creates a new OpenIdUser pre-populated with discovery data (to skip discovery). |
static OpenIdUser |
populate(String identifier,
String claimedId,
String openIdServer,
String openIdDelegate)
Creates a new OpenIdUser pre-populated with discovery data (to skip discovery). |
Object |
removeAttribute(String name)
Removes the custom, persistent attribute mapped to the given key . |
void |
setAttribute(String key,
Object value)
Sets a custom attribute that will be peristent across different http requests. |
void |
toJSON(org.mortbay.util.ajax.JSON.Output out)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String ATTR_NAME
Constructor Detail |
---|
public OpenIdUser()
Method Detail |
---|
public static OpenIdUser populate(OpenIdUser user)
user
.
public static OpenIdUser populate(String identifier, String claimedId, String openIdServer)
public static OpenIdUser populate(String identifier, String claimedId, String openIdServer, String openIdDelegate)
public boolean isAssociated()
public boolean isAuthenticated()
public String getIdentifier()
public String getClaimedId()
public String getOpenIdServer()
public String getOpenIdDelegate()
public String getIdentity()
public String getAssocHandle()
public void setAttribute(String key, Object value)
public Map<String,Object> getAttributes()
public Map<String,Object> getA()
getAttributes()
, which is convenient for views/templates.
public Object getAttribute(String name)
key
.
public Object removeAttribute(String name)
key
.
public Map<String,String> getExtensions()
public void addExtension(String namespace, String alias)
NOTE: This is invoked only on discovery and association. The mappings are not persistent across different http requests (transient).
public String getExtension(String namespace)
namespace
.
public void fromJSON(Map map)
fromJSON
in interface org.mortbay.util.ajax.JSON.Convertible
public void toJSON(org.mortbay.util.ajax.JSON.Output out)
toJSON
in interface org.mortbay.util.ajax.JSON.Convertible
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |