Package net.oauth
Class OAuthCredentials
- java.lang.Object
-
- org.apache.http.auth.UsernamePasswordCredentials
-
- net.oauth.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 Summary
Constructors Constructor Description OAuthCredentials(String consumerKey, String consumerSecret)
Constructs a simple accessor, containing only a consumer key and secret.OAuthCredentials(OAuthAccessor accessor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OAuthAccessor
getAccessor()
String
getPassword()
Get the current consumer secret, to be used as a password.String
getUserName()
Get the current consumer key, to be used as a password.
-
-
-
Constructor Detail
-
OAuthCredentials
public OAuthCredentials(OAuthAccessor accessor)
-
-
Method Detail
-
getAccessor
public OAuthAccessor getAccessor()
-
getPassword
public String getPassword()
Get the current consumer secret, to be used as a password.- Specified by:
getPassword
in interfaceorg.apache.http.auth.Credentials
- Overrides:
getPassword
in classorg.apache.http.auth.UsernamePasswordCredentials
-
getUserName
public String getUserName()
Get the current consumer key, to be used as a password.- Overrides:
getUserName
in classorg.apache.http.auth.UsernamePasswordCredentials
-
-