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:
  • Constructor Details

    • LyoOAuthConsumer

      public LyoOAuthConsumer(String consumerKey, String consumerSecret)
    • LyoOAuthConsumer

      public LyoOAuthConsumer(String callbackURL, String consumerKey, String consumerSecret)
    • LyoOAuthConsumer

      public LyoOAuthConsumer(String callbackURL, String consumerKey, String consumerSecret, net.oauth.OAuthServiceProvider serviceProvider)
  • Method Details

    • 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