Class OAuthToken
- java.lang.Object
-
- org.openstreetmap.josm.data.oauth.OAuthToken
-
public class OAuthToken extends Object
An oauth token that has been obtained by JOSM and can be used to authenticate the user on the server.
-
-
Constructor Summary
Constructors Constructor Description OAuthToken(String key, String secret)
Creates a new tokenOAuthToken(OAuthToken other)
Creates a clone of another token
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static OAuthToken
createToken(oauth.signpost.OAuthConsumer consumer)
Creates an OAuthToken from the token currently managed by theOAuthConsumer
.boolean
equals(Object obj)
String
getKey()
Replies the token keyString
getSecret()
Replies the token secretint
hashCode()
-
-
-
Constructor Detail
-
OAuthToken
public OAuthToken(String key, String secret)
Creates a new token- Parameters:
key
- the token keysecret
- the token secret
-
OAuthToken
public OAuthToken(OAuthToken other)
Creates a clone of another token- Parameters:
other
- the other token. Must not be null.- Throws:
IllegalArgumentException
- if other is null
-
-
Method Detail
-
createToken
public static OAuthToken createToken(oauth.signpost.OAuthConsumer consumer)
Creates an OAuthToken from the token currently managed by theOAuthConsumer
.- Parameters:
consumer
- the consumer- Returns:
- the token
-
-