com.dyuproject.oauth.sp
Class ConcurrentMapHashStore

java.lang.Object
  extended by com.dyuproject.oauth.sp.HashStore
      extended by com.dyuproject.oauth.sp.ConcurrentMapHashStore
All Implemented Interfaces:
ServiceToken.Store

public final class ConcurrentMapHashStore
extends HashStore

ConcurrentHashMap - in-memory consumer keys

Author:
David Yu
Date created:
Jun 8, 2009

Field Summary
 
Fields inherited from class com.dyuproject.oauth.sp.HashStore
DEFAULT_ACCESS_TIMEOUT, DEFAULT_EXCHANGE_TIMEOUT, DEFAULT_LOGIN_TIMEOUT, DEFAULT_MAC_ALGORITHM
 
Constructor Summary
ConcurrentMapHashStore(String secretKey, String macSecretKey)
           
ConcurrentMapHashStore(String secretKey, String macSecretKey, String macAlgorithm, long accessTimeout, long exchangeTimeout, long loginTimeout)
           
 
Method Summary
 ConcurrentMapHashStore addConsumer(String consumerKey, String consumerSecret)
          Adds a consumer entry (consumerKey and consumerSecret); If there is an existing consumerKey, it will not be added.
protected  String getConsumerSecret(String consumerKey)
           
 
Methods inherited from class com.dyuproject.oauth.sp.HashStore
generateToken, getAccessToken, getAuthCallbackOrVerifier, getRequestToken, newAccessToken, newAccessToken, newHybridRequestToken, newRequestToken, validateCallbackUrl, validateUrl
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConcurrentMapHashStore

public ConcurrentMapHashStore(String secretKey,
                              String macSecretKey)

ConcurrentMapHashStore

public ConcurrentMapHashStore(String secretKey,
                              String macSecretKey,
                              String macAlgorithm,
                              long accessTimeout,
                              long exchangeTimeout,
                              long loginTimeout)
Method Detail

getConsumerSecret

protected String getConsumerSecret(String consumerKey)
Specified by:
getConsumerSecret in class HashStore

addConsumer

public ConcurrentMapHashStore addConsumer(String consumerKey,
                                          String consumerSecret)
Adds a consumer entry (consumerKey and consumerSecret); If there is an existing consumerKey, it will not be added.



Copyright © 2008-2013. All Rights Reserved.