|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.dyuproject.openid.Identifier
public final class Identifier
The openid identifier is the user-supplied openid.
Nested Class Summary | |
---|---|
static interface |
Identifier.Resolver
Resolves the non-url identifier by assigning the openid server endpoint url or the location of the xrds document. |
static class |
Identifier.ResolverCollection
Allows for chaining the resolution until it is successfully resolved. |
Field Summary | |
---|---|
static String |
ASSIGNED_PREFIX
"http://" |
static String |
CHECKED_PREFIX
"http" |
Constructor Summary | |
---|---|
Identifier(String id)
|
Method Summary | |
---|---|
String |
getId()
Gets the id. |
static Identifier |
getIdentifier(String id,
Identifier.Resolver resolver,
OpenIdContext context)
Returns an Identifier with the id same as the url if the given id is
a valid url; If not, the given resolver will resolve the url. |
String |
getUrl()
Gets the url. |
boolean |
isResolved()
Checks whether this identifier is resolved - meaning the url (openid server endpoint) is provided. |
boolean |
isUrlContentTypeXrds()
Checks whether the url is an xrds document. |
void |
resolve(String url)
Resolves this identifier by providing a non-null url - which is the user's openid server. |
void |
resolve(String url,
boolean xrds)
Resolves this identifier by providing a non-null url - which is the user's openid server. |
void |
resolve(String url,
boolean xrds,
String newId)
Resolves this identifier by providing a non-null url - which is the user's openid server. |
void |
resolve(String url,
String newId)
Resolves this identifier by providing a non-null url - which is the user's openid server, and also changing the id of this identifier. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String CHECKED_PREFIX
public static final String ASSIGNED_PREFIX
Constructor Detail |
---|
public Identifier(String id)
Method Detail |
---|
public void resolve(String url)
public void resolve(String url, boolean xrds)
xrds
is to indicate that this url points to an
xrds document.
public void resolve(String url, String newId)
public void resolve(String url, boolean xrds, String newId)
xrds
is to indicate that this url points to an
xrds document. If newId
is not null, it will replace the id of this identifier.
public String getUrl()
public String getId()
public boolean isUrlContentTypeXrds()
public boolean isResolved()
public static Identifier getIdentifier(String id, Identifier.Resolver resolver, OpenIdContext context)
id
is
a valid url; If not, the given resolver
will resolve the url.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |