Class NuxeoOAuthToken
- java.lang.Object
-
- org.nuxeo.ecm.platform.oauth.tokens.NuxeoOAuthToken
-
- All Implemented Interfaces:
OAuthToken
public class NuxeoOAuthToken extends Object implements OAuthToken
Implementation of theOAuthToken
interface. Provides mapping features to DocumentModel so that Token can be stored in a SQL Directory- Author:
- tiry
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.nuxeo.ecm.platform.oauth.tokens.OAuthToken
OAuthToken.Type
-
-
Field Summary
Fields Modifier and Type Field Description protected String
appId
protected String
callbackUrl
protected String
clientId
protected boolean
clientToken
protected String
consumerKey
protected Calendar
creationDate
protected long
durationInMinutes
protected String
nuxeoLogin
static String
SCHEMA
protected String
token
protected String
tokenSecret
protected OAuthToken.Type
type
protected String
verifier
-
Constructor Summary
Constructors Constructor Description NuxeoOAuthToken(String consumerKey, String callBack)
NuxeoOAuthToken(DocumentModel entry)
NuxeoOAuthToken(NuxeoOAuthToken originalToken)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getAppId()
Returns consumer application identifier.String
getCallbackUrl()
Returns consumer call back url (may be used to override what is provided in theOAuthConsumerRegistry
.String
getClientId()
String
getConsumerKey()
Gets the Consumer Key.Calendar
getCreationDate()
Gets creation date of the Token.String
getNuxeoLogin()
Returns Nuxeo Login as determined during the authorize phase.String
getToken()
Returns OAuth token.String
getTokenSecret()
Returns secret associated to the Token.OAuthToken.Type
getType()
Gets the type of token: REQUEST / ACCESS.String
getValue(String keyName)
Generic getter (not used for now).String
getVerifier()
Gets the verifier code.boolean
isClientToken()
boolean
isExpired()
Checks is token is expired.void
setNuxeoLogin(String login)
Setter for the Login.void
setValue(String keyName, String value)
Generic setter (not used for now).void
updateEntry(DocumentModel entry)
-
-
-
Field Detail
-
SCHEMA
public static final String SCHEMA
- See Also:
- Constant Field Values
-
appId
protected String appId
-
callbackUrl
protected String callbackUrl
-
nuxeoLogin
protected String nuxeoLogin
-
token
protected String token
-
tokenSecret
protected String tokenSecret
-
consumerKey
protected String consumerKey
-
type
protected OAuthToken.Type type
-
creationDate
protected Calendar creationDate
-
verifier
protected String verifier
-
durationInMinutes
protected long durationInMinutes
-
clientToken
protected boolean clientToken
-
clientId
protected String clientId
-
-
Constructor Detail
-
NuxeoOAuthToken
public NuxeoOAuthToken(NuxeoOAuthToken originalToken)
-
NuxeoOAuthToken
public NuxeoOAuthToken(DocumentModel entry)
-
-
Method Detail
-
updateEntry
public void updateEntry(DocumentModel entry)
-
getAppId
public String getAppId()
Description copied from interface:OAuthToken
Returns consumer application identifier.- Specified by:
getAppId
in interfaceOAuthToken
-
getCallbackUrl
public String getCallbackUrl()
Description copied from interface:OAuthToken
Returns consumer call back url (may be used to override what is provided in theOAuthConsumerRegistry
.- Specified by:
getCallbackUrl
in interfaceOAuthToken
-
getNuxeoLogin
public String getNuxeoLogin()
Description copied from interface:OAuthToken
Returns Nuxeo Login as determined during the authorize phase.- Specified by:
getNuxeoLogin
in interfaceOAuthToken
-
getToken
public String getToken()
Description copied from interface:OAuthToken
Returns OAuth token.- Specified by:
getToken
in interfaceOAuthToken
-
getTokenSecret
public String getTokenSecret()
Description copied from interface:OAuthToken
Returns secret associated to the Token.- Specified by:
getTokenSecret
in interfaceOAuthToken
-
getConsumerKey
public String getConsumerKey()
Description copied from interface:OAuthToken
Gets the Consumer Key.- Specified by:
getConsumerKey
in interfaceOAuthToken
-
getType
public OAuthToken.Type getType()
Description copied from interface:OAuthToken
Gets the type of token: REQUEST / ACCESS.- Specified by:
getType
in interfaceOAuthToken
-
getCreationDate
public Calendar getCreationDate()
Description copied from interface:OAuthToken
Gets creation date of the Token.- Specified by:
getCreationDate
in interfaceOAuthToken
-
getValue
public String getValue(String keyName)
Description copied from interface:OAuthToken
Generic getter (not used for now).- Specified by:
getValue
in interfaceOAuthToken
-
setValue
public void setValue(String keyName, String value)
Description copied from interface:OAuthToken
Generic setter (not used for now).- Specified by:
setValue
in interfaceOAuthToken
-
getVerifier
public String getVerifier()
Description copied from interface:OAuthToken
Gets the verifier code.- Specified by:
getVerifier
in interfaceOAuthToken
-
isExpired
public boolean isExpired()
Description copied from interface:OAuthToken
Checks is token is expired.- Specified by:
isExpired
in interfaceOAuthToken
-
setNuxeoLogin
public void setNuxeoLogin(String login)
Description copied from interface:OAuthToken
Setter for the Login.- Specified by:
setNuxeoLogin
in interfaceOAuthToken
-
isClientToken
public boolean isClientToken()
-
getClientId
public String getClientId()
-
-