Package com.streamreduce.core.model

Examples of com.streamreduce.core.model.OAuthRequestToken


    OAuthRequestTokenDao oAuthRequestTokenDao;

    @Before
    public void setUp() throws Exception {
        MockitoAnnotations.initMocks(this);
        OAuthRequestToken testToken = new OAuthRequestToken(new Token("access", "secret"));
        when(oAuthRequestTokenDao.findByToken("access")).thenReturn(testToken);
        mongoDbOAuthTokenCacheService = new MongoDbOAuthTokenCacheService(oAuthRequestTokenDao);
    }
View Full Code Here


    }

    @Override
    public void cacheToken(Token requestToken) {
        if (requestToken == null || requestToken.getToken() == null) { return ; }
        dao.save(new OAuthRequestToken(requestToken));
    }
View Full Code Here


    @Override
    public Token retrieveToken(String oauthToken) {
        if (oauthToken == null) { return null; }
        OAuthRequestToken requestToken = dao.findByToken(oauthToken);
        if (requestToken == null) { return null; }
        return requestToken.toScribeToken();
    }
View Full Code Here

TOP

Related Classes of com.streamreduce.core.model.OAuthRequestToken

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.