Class LyoOAuthConsumer
- java.lang.Object
-
- net.oauth.OAuthConsumer
-
- org.eclipse.lyo.server.oauth.core.consumer.LyoOAuthConsumer
-
- All Implemented Interfaces:
Serializable
public class LyoOAuthConsumer extends net.oauth.OAuthConsumerAn OAuth consumer with extra properties, including a name and a trusted flag.- Author:
- Samuel Padgett
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classLyoOAuthConsumer.OAuthVersion
-
Constructor Summary
Constructors Constructor Description LyoOAuthConsumer(String consumerKey, String consumerSecret)LyoOAuthConsumer(String callbackURL, String consumerKey, String consumerSecret)LyoOAuthConsumer(String callbackURL, String consumerKey, String consumerSecret, net.oauth.OAuthServiceProvider serviceProvider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetKey()StringgetName()Gets the name of the consumer, which might be shown in the login dialog and other user interfaces.LyoOAuthConsumer.OAuthVersiongetOAuthVersion()Gets the OAuth version that the consumer supports.booleanisProvisional()booleanisTrusted()Answers if this consumer is trusted.voidsetName(String name)Sets the name of the consumer, which might be shown in the login dialog and other user interfaces.voidsetOAuthVersion(LyoOAuthConsumer.OAuthVersion oAuthVersion)Sets the OAuth version that the consumer supports.voidsetProvisional(boolean provisional)voidsetTrusted(boolean trusted)Sets if this consumer is trusted.
-
-
-
Method Detail
-
getKey
public String getKey()
-
getName
public String getName()
Gets the name of the consumer, which might be shown in the login dialog and other user interfaces.- Returns:
- the name
-
setName
public void setName(String name)
Sets the name of the consumer, which might be shown in the login dialog and other user interfaces.- Parameters:
name- the name
-
isProvisional
public boolean isProvisional()
-
setProvisional
public void setProvisional(boolean provisional)
-
isTrusted
public boolean isTrusted()
Answers if this consumer is trusted. If a consumer is trusted, a login prompt might be skipped if the user is already authenticated with this web page.- Returns:
- true if the consumer is trusted, false otherwise
-
setTrusted
public void setTrusted(boolean trusted)
Sets if this consumer is trusted. If a consumer is trusted, a login prompt might be skipped if the user is already authenticated with this web page.- Parameters:
trusted- true if the consumer is trusted, false otherwise
-
getOAuthVersion
public LyoOAuthConsumer.OAuthVersion getOAuthVersion()
Gets the OAuth version that the consumer supports.- Returns:
- the OAuth version
-
setOAuthVersion
public void setOAuthVersion(LyoOAuthConsumer.OAuthVersion oAuthVersion)
Sets the OAuth version that the consumer supports. This should be set by the OAuth service depending on whether the consumer specified an oauth_callback parameter when asking for a request token.- Parameters:
oAuthVersion- the OAuth version
-
-