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 theOAuthTokeninterface. 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 StringappIdprotected StringcallbackUrlprotected StringclientIdprotected booleanclientTokenprotected StringconsumerKeyprotected CalendarcreationDateprotected longdurationInMinutesprotected StringnuxeoLoginstatic StringSCHEMAprotected Stringtokenprotected StringtokenSecretprotected OAuthToken.Typetypeprotected Stringverifier
-
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 StringgetAppId()Returns consumer application identifier.StringgetCallbackUrl()Returns consumer call back url (may be used to override what is provided in theOAuthConsumerRegistry.StringgetClientId()StringgetConsumerKey()Gets the Consumer Key.CalendargetCreationDate()Gets creation date of the Token.StringgetNuxeoLogin()Returns Nuxeo Login as determined during the authorize phase.StringgetToken()Returns OAuth token.StringgetTokenSecret()Returns secret associated to the Token.OAuthToken.TypegetType()Gets the type of token: REQUEST / ACCESS.StringgetValue(String keyName)Generic getter (not used for now).StringgetVerifier()Gets the verifier code.booleanisClientToken()booleanisExpired()Checks is token is expired.voidsetNuxeoLogin(String login)Setter for the Login.voidsetValue(String keyName, String value)Generic setter (not used for now).voidupdateEntry(DocumentModel entry)
-
-
-
Field Detail
-
SCHEMA
public static final String SCHEMA
- See Also:
- Constant Field Values
-
callbackUrl
protected String callbackUrl
-
nuxeoLogin
protected String nuxeoLogin
-
tokenSecret
protected String tokenSecret
-
consumerKey
protected String consumerKey
-
type
protected OAuthToken.Type type
-
creationDate
protected Calendar creationDate
-
durationInMinutes
protected long durationInMinutes
-
clientToken
protected boolean clientToken
-
-
Constructor Detail
-
NuxeoOAuthToken
public NuxeoOAuthToken(String consumerKey, String callBack)
-
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:OAuthTokenReturns consumer application identifier.- Specified by:
getAppIdin interfaceOAuthToken
-
getCallbackUrl
public String getCallbackUrl()
Description copied from interface:OAuthTokenReturns consumer call back url (may be used to override what is provided in theOAuthConsumerRegistry.- Specified by:
getCallbackUrlin interfaceOAuthToken
-
getNuxeoLogin
public String getNuxeoLogin()
Description copied from interface:OAuthTokenReturns Nuxeo Login as determined during the authorize phase.- Specified by:
getNuxeoLoginin interfaceOAuthToken
-
getToken
public String getToken()
Description copied from interface:OAuthTokenReturns OAuth token.- Specified by:
getTokenin interfaceOAuthToken
-
getTokenSecret
public String getTokenSecret()
Description copied from interface:OAuthTokenReturns secret associated to the Token.- Specified by:
getTokenSecretin interfaceOAuthToken
-
getConsumerKey
public String getConsumerKey()
Description copied from interface:OAuthTokenGets the Consumer Key.- Specified by:
getConsumerKeyin interfaceOAuthToken
-
getType
public OAuthToken.Type getType()
Description copied from interface:OAuthTokenGets the type of token: REQUEST / ACCESS.- Specified by:
getTypein interfaceOAuthToken
-
getCreationDate
public Calendar getCreationDate()
Description copied from interface:OAuthTokenGets creation date of the Token.- Specified by:
getCreationDatein interfaceOAuthToken
-
getValue
public String getValue(String keyName)
Description copied from interface:OAuthTokenGeneric getter (not used for now).- Specified by:
getValuein interfaceOAuthToken
-
setValue
public void setValue(String keyName, String value)
Description copied from interface:OAuthTokenGeneric setter (not used for now).- Specified by:
setValuein interfaceOAuthToken
-
getVerifier
public String getVerifier()
Description copied from interface:OAuthTokenGets the verifier code.- Specified by:
getVerifierin interfaceOAuthToken
-
isExpired
public boolean isExpired()
Description copied from interface:OAuthTokenChecks is token is expired.- Specified by:
isExpiredin interfaceOAuthToken
-
setNuxeoLogin
public void setNuxeoLogin(String login)
Description copied from interface:OAuthTokenSetter for the Login.- Specified by:
setNuxeoLoginin interfaceOAuthToken
-
isClientToken
public boolean isClientToken()
-
getClientId
public String getClientId()
-
-