Package org.eurekastreams.server.action.request.opensocial

Examples of org.eurekastreams.server.action.request.opensocial.GetConsumerInfoRequest


    {
        context.checking(new Expectations()
        {
            {
                oneOf(actionContext).getParams();
                will(returnValue(new GetConsumerInfoRequest(securityToken, "serviceName", provider)));

                oneOf(securityToken).getAppUrl();
                will(returnValue("http://localhost:4040/some/path"));

                oneOf(consumerMapper).execute(with(any(OAuthConsumerRequest.class)));
View Full Code Here


    {
        context.checking(new Expectations()
        {
            {
                oneOf(actionContext).getParams();
                will(returnValue(new GetConsumerInfoRequest(securityToken, "serviceName", provider)));

                oneOf(securityToken).getAppUrl();
                will(returnValue("http://localhost:4040/some/path"));

                oneOf(consumerMapper).execute(with(any(OAuthConsumerRequest.class)));
View Full Code Here

     * {@inheritDoc}. Get the OAuth consumer token info.
     */
    @Override
    public Serializable execute(final PrincipalActionContext inActionContext) throws ExecutionException
    {
        GetConsumerInfoRequest request = (GetConsumerInfoRequest) inActionContext.getParams();
        OAuthConsumer oauthConsumer = consumerMapper.execute(new OAuthConsumerRequest(request.getServiceName(), request
                .getSecurityToken().getAppUrl()));
        if (oauthConsumer == null)
        {
            throw new ExecutionException("OAuth Consumer was not found");
        }
        net.oauth.OAuthConsumer consumer = new net.oauth.OAuthConsumer(oauthConsumer.getCallbackURL(), oauthConsumer
                .getConsumerKey(), oauthConsumer.getConsumerSecret(), request.getProvider());
        consumer.setProperty(OAuth.OAUTH_SIGNATURE_METHOD, oauthConsumer.getSignatureMethod());
        ConsumerInfo consumerInfo = new ConsumerInfo(consumer, null, oauthConsumer.getCallbackURL());
        return new ConsumerInfoResponse(consumerInfo);
    }
View Full Code Here

            final OAuthServiceProvider provider) throws GadgetException
    {
        ConsumerInfo consumerInfo = null;
        try
        {
            GetConsumerInfoRequest request = new GetConsumerInfoRequest(securityToken, serviceName, provider);
            ServiceActionContext currentContext = new ServiceActionContext(request, null);
            ConsumerInfoResponse response = (ConsumerInfoResponse) actionController.execute(currentContext,
                    getConsumerInfoAction);
            consumerInfo = response.getConsumerInfo();
        }
View Full Code Here

TOP

Related Classes of org.eurekastreams.server.action.request.opensocial.GetConsumerInfoRequest

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.