Package net.oauth

Class OAuthCredentials

  • All Implemented Interfaces:
    Serializable, org.apache.http.auth.Credentials

    public class OAuthCredentials
    extends org.apache.http.auth.UsernamePasswordCredentials
    An OAuthAccessor, to be used as credentials for an AuthScheme based on OAuth. The OAuthAccessor is contained by reference, so you can change it to contain the OAuth tokens and secrets that you receive from a service provider.
    Author:
    John Kristian
    See Also:
    Serialized Form
    • Constructor Detail

      • OAuthCredentials

        public OAuthCredentials​(OAuthAccessor accessor)
      • OAuthCredentials

        public OAuthCredentials​(String consumerKey,
                                String consumerSecret)
        Constructs a simple accessor, containing only a consumer key and secret. This is useful for two-legged OAuth; that is interaction between a Consumer and ArcGisRestService Provider with no User involvement.
    • Method Detail

      • getPassword

        public String getPassword()
        Get the current consumer secret, to be used as a password.
        Specified by:
        getPassword in interface org.apache.http.auth.Credentials
        Overrides:
        getPassword in class org.apache.http.auth.UsernamePasswordCredentials
      • getUserName

        public String getUserName()
        Get the current consumer key, to be used as a password.
        Overrides:
        getUserName in class org.apache.http.auth.UsernamePasswordCredentials