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.OAuthConsumer
An OAuth consumer with extra properties, including a name and a trusted flag.
- Author:
- Samuel Padgett
- See Also:
-
Nested Class Summary
-
Field Summary
Fields inherited from class net.oauth.OAuthConsumer
ACCEPT_ENCODING, ACCESSOR_SECRET, callbackURL, consumerKey, consumerSecret, serviceProvider
-
Constructor Summary
ConstructorDescriptionLyoOAuthConsumer
(String consumerKey, String consumerSecret) LyoOAuthConsumer
(String callbackURL, String consumerKey, String consumerSecret) LyoOAuthConsumer
(String callbackURL, String consumerKey, String consumerSecret, net.oauth.OAuthServiceProvider serviceProvider) -
Method Summary
Modifier and TypeMethodDescriptiongetKey()
getName()
Gets the name of the consumer, which might be shown in the login dialog and other user interfaces.Gets the OAuth version that the consumer supports.boolean
boolean
Answers if this consumer is trusted.void
Sets the name of the consumer, which might be shown in the login dialog and other user interfaces.void
setOAuthVersion
(LyoOAuthConsumer.OAuthVersion oAuthVersion) Sets the OAuth version that the consumer supports.void
setProvisional
(boolean provisional) void
setTrusted
(boolean trusted) Sets if this consumer is trusted.Methods inherited from class net.oauth.OAuthConsumer
getProperty, setProperty
-
Constructor Details
-
LyoOAuthConsumer
-
LyoOAuthConsumer
-
LyoOAuthConsumer
-
-
Method Details
-
getKey
-
getName
Gets the name of the consumer, which might be shown in the login dialog and other user interfaces.- Returns:
- the name
-
setName
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
Gets the OAuth version that the consumer supports.- Returns:
- the OAuth version
-
setOAuthVersion
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
-