Package play.libs.WS

Examples of play.libs.WS.WSRequestHolder


        final String absoluteUrl = getAbsoluteUrl(url, acHost);

        LOGGER.debug(format("Creating request to '%s'", absoluteUrl));

        final WSRequestHolder request = WS.url(absoluteUrl)
                .setTimeout(DEFAULT_TIMEOUT.intValue());

        if (signRequest) {
            request.setFollowRedirects(false) // because we need to sign again in those cases.
            .sign(new JwtSignatureCalculator(jwtAuthorisationGenerator, acHost, userId));
        }

        return request;
    }
View Full Code Here


        final String absoluteUrl = getAbsoluteUrl(url, acHost);

        LOGGER.debug(format("Creating request to '%s'", absoluteUrl));

        final WSRequestHolder request = WS.url(absoluteUrl)
                .setTimeout(DEFAULT_TIMEOUT.intValue());

        if (signRequest) {
            request.setFollowRedirects(false) // because we need to sign again in those cases.
            .sign(new JwtSignatureCalculator(jwtAuthorisationGenerator));
        }

        return request;
    }
View Full Code Here

        final String absoluteUrl = getAbsoluteUrl(url, acHost);

        LOGGER.debug(format("Creating request to '%s'", absoluteUrl));

        final WSRequestHolder request = WS.url(absoluteUrl)
                .setTimeout(DEFAULT_TIMEOUT.intValue());

        if (signRequest) {
            request.setFollowRedirects(false) // because we need to sign again in those cases.
            .sign(new JwtSignatureCalculator(jwtAuthorisationGenerator, acHost, userId));
        }

        return request;
    }
View Full Code Here

  protected I getAccessToken(final String code, final Request request)
            throws AccessTokenException, ResolverMissingException {
    final Configuration c = getConfiguration();
    final String params = getAccessTokenParams(c, code, request);
    final String url = c.getString(SettingKeys.ACCESS_TOKEN_URL);
        final WSRequestHolder wrh = WS.url(url);
        wrh.setHeader(CONTENT_TYPE, "application/x-www-form-urlencoded");
        for(final Map.Entry<String, String> header : getHeaders().entrySet()) {
            wrh.setHeader(header.getKey(), header.getValue());
        }

    final WSResponse r = wrh.post(params).get(PlayAuthenticate.TIMEOUT);

    return buildInfo(r);
  }
View Full Code Here

TOP

Related Classes of play.libs.WS.WSRequestHolder

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.