Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.platform.oauth.tokens
Class NuxeoOAuthToken

java.lang.Object
  extended by org.nuxeo.ecm.platform.oauth.tokens.NuxeoOAuthToken
All Implemented Interfaces:
OAuthToken

public class NuxeoOAuthToken
extends Object
implements OAuthToken

Implementation of the OAuthToken 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
static String SCHEMA
           
 
Constructor Summary
NuxeoOAuthToken(DocumentModel entry)
           
NuxeoOAuthToken(NuxeoOAuthToken originalToken)
           
NuxeoOAuthToken(String consumerKey, String callBack)
           
 
Method Summary
 String getAppId()
          Returns consumer application identifier.
 String getCallbackUrl()
          Returns consumer call back url (may be used to override what is provided in the OAuthConsumerRegistry.
 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)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SCHEMA

public static final String SCHEMA
See Also:
Constant Field Values
Constructor Detail

NuxeoOAuthToken

public NuxeoOAuthToken(String consumerKey,
                       String callBack)

NuxeoOAuthToken

public NuxeoOAuthToken(NuxeoOAuthToken originalToken)

NuxeoOAuthToken

public NuxeoOAuthToken(DocumentModel entry)
                throws ClientException
Throws:
ClientException
Method Detail

updateEntry

public void updateEntry(DocumentModel entry)
                 throws ClientException
Throws:
ClientException

getAppId

public String getAppId()
Description copied from interface: OAuthToken
Returns consumer application identifier.

Specified by:
getAppId in interface OAuthToken

getCallbackUrl

public String getCallbackUrl()
Description copied from interface: OAuthToken
Returns consumer call back url (may be used to override what is provided in the OAuthConsumerRegistry.

Specified by:
getCallbackUrl in interface OAuthToken

getNuxeoLogin

public String getNuxeoLogin()
Description copied from interface: OAuthToken
Returns Nuxeo Login as determined during the authorize phase.

Specified by:
getNuxeoLogin in interface OAuthToken

getToken

public String getToken()
Description copied from interface: OAuthToken
Returns OAuth token.

Specified by:
getToken in interface OAuthToken

getTokenSecret

public String getTokenSecret()
Description copied from interface: OAuthToken
Returns secret associated to the Token.

Specified by:
getTokenSecret in interface OAuthToken

getConsumerKey

public String getConsumerKey()
Description copied from interface: OAuthToken
Gets the Consumer Key.

Specified by:
getConsumerKey in interface OAuthToken

getType

public OAuthToken.Type getType()
Description copied from interface: OAuthToken
Gets the type of token: REQUEST / ACCESS.

Specified by:
getType in interface OAuthToken

getCreationDate

public Calendar getCreationDate()
Description copied from interface: OAuthToken
Gets creation date of the Token.

Specified by:
getCreationDate in interface OAuthToken

getValue

public String getValue(String keyName)
Description copied from interface: OAuthToken
Generic getter (not used for now).

Specified by:
getValue in interface OAuthToken

setValue

public void setValue(String keyName,
                     String value)
Description copied from interface: OAuthToken
Generic setter (not used for now).

Specified by:
setValue in interface OAuthToken

getVerifier

public String getVerifier()
Description copied from interface: OAuthToken
Gets the verifier code.

Specified by:
getVerifier in interface OAuthToken

isExpired

public boolean isExpired()
Description copied from interface: OAuthToken
Checks is token is expired.

Specified by:
isExpired in interface OAuthToken

setNuxeoLogin

public void setNuxeoLogin(String login)
Description copied from interface: OAuthToken
Setter for the Login.

Specified by:
setNuxeoLogin in interface OAuthToken

isClientToken

public boolean isClientToken()

getClientId

public String getClientId()

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.