Package org.apache.shindig.gadgets

Examples of org.apache.shindig.gadgets.AuthType


      // Detect the authz parsing
      if (httpApiRequest.authz != null) {
        req.setAuthType(AuthType.parse(httpApiRequest.authz));
      }

      final AuthType authType = req.getAuthType();
      if (authType != AuthType.NONE) {
        if (authType == AuthType.OAUTH2) {
          req.setSecurityToken(requestItem.getToken());

          Map<String, String> authSettings = getAuthSettings(requestItem);
View Full Code Here


    // allows proper rewriting of <script src="x"/> where x is returned with
    // a content type like text/html which unfortunately happens all too often
    req.setRewriteMimeType(getParameter(request, Param.REWRITE_MIME_TYPE.getKey(), null));

    // Figure out whether authentication is required
    AuthType auth = AuthType.parse(getParameter(request, AUTHZ_PARAM, null));
    req.setAuthType(auth);
    if (auth != AuthType.NONE) {
      if (auth == AuthType.OAUTH2) {
        req.setSecurityToken(extractAndValidateToken(request));
        req.setOAuth2Arguments(new OAuth2Arguments(request));
View Full Code Here

    // allows proper rewriting of <script src="x"/> where x is returned with
    // a content type like text/html which unfortunately happens all too often
    req.setRewriteMimeType(request.getParameter(REWRITE_MIME_TYPE_PARAM));

    // Figure out whether authentication is required
    AuthType auth = AuthType.parse(getParameter(request, AUTHZ_PARAM, null));
    req.setAuthType(auth);
    if (auth != AuthType.NONE) {
      req.setSecurityToken(extractAndValidateToken(request));
      req.setOAuthArguments(new OAuthArguments(auth, request));
    }
View Full Code Here

    // allows proper rewriting of <script src="x"/> where x is returned with
    // a content type like text/html which unfortunately happens all too often
    req.setRewriteMimeType(request.getParameter(REWRITE_MIME_TYPE_PARAM));

    // Figure out whether authentication is required
    AuthType auth = AuthType.parse(getParameter(request, AUTHZ_PARAM, null));
    req.setAuthType(auth);
    if (auth != AuthType.NONE) {
      req.setSecurityToken(extractAndValidateToken(request));
      req.setOAuthArguments(new OAuthArguments(auth, request));
    }
View Full Code Here

    // allows proper rewriting of <script src="x"/> where x is returned with
    // a content type like text/html which unfortunately happens all too often
    req.setRewriteMimeType(getParameter(request, Param.REWRITE_MIME_TYPE.getKey(), null));

    // Figure out whether authentication is required
    AuthType auth = AuthType.parse(getParameter(request, AUTHZ_PARAM, null));
    req.setAuthType(auth);
    if (auth != AuthType.NONE) {
      req.setSecurityToken(extractAndValidateToken(request));
      if (auth == AuthType.OAUTH2) {
        req.setOAuth2Arguments(new OAuth2Arguments(request));
View Full Code Here

        req.setAuthType(AuthType.parse(httpApiRequest.authz));
      }

      req.setSecurityToken(requestItem.getToken());

      final AuthType authType = req.getAuthType();
      if (authType != AuthType.NONE) {
        if (authType == AuthType.OAUTH2) {
          Map<String, String> authSettings = getAuthSettings(requestItem);
          OAuth2Arguments oauth2Args = new OAuth2Arguments(req.getAuthType(), authSettings);
View Full Code Here

    // allows proper rewriting of <script src="x"/> where x is returned with
    // a content type like text/html which unfortunately happens all too often
    req.setRewriteMimeType(getParameter(request, Param.REWRITE_MIME_TYPE.getKey(), null));

    // Figure out whether authentication is required
    AuthType auth = AuthType.parse(getParameter(request, AUTHZ_PARAM, null));
    req.setAuthType(auth);
    if (auth != AuthType.NONE) {
      req.setSecurityToken(extractAndValidateToken(request));
      if (auth == AuthType.OAUTH2) {
        req.setOAuth2Arguments(new OAuth2Arguments(request));
View Full Code Here

        req.setAuthType(AuthType.parse(httpApiRequest.authz));
      }

      req.setSecurityToken(requestItem.getToken());

      final AuthType authType = req.getAuthType();
      if (authType != AuthType.NONE) {
        if (authType == AuthType.OAUTH2) {
          Map<String, String> authSettings = getAuthSettings(requestItem);
          OAuth2Arguments oauth2Args = new OAuth2Arguments(req.getAuthType(), authSettings);
View Full Code Here

      if(proxyUri.getGadget() == null) {
        if(st != null && !st.isAnonymous()) {
          proxyUri.setGadget(st.getAppUrl());
        }
      }
      AuthType authType = proxyUri.getAuthType();
      if(AuthType.OAUTH.equals(authType)) {
        proxyUri.setOAuthArguments(new OAuthArguments(AuthType.OAUTH, request));
      } else if(AuthType.OAUTH2.equals(authType)) {
        proxyUri.setOAuth2Arguments(new OAuth2Arguments(request));
      }
View Full Code Here

    // allows proper rewriting of <script src="x"/> where x is returned with
    // a content type like text/html which unfortunately happens all too often
    req.setRewriteMimeType(getParameter(request, Param.REWRITE_MIME_TYPE.getKey(), null));

    // Figure out whether authentication is required
    AuthType auth = AuthType.parse(getParameter(request, AUTHZ_PARAM, null));
    req.setAuthType(auth);
    if (auth != AuthType.NONE) {
      req.setSecurityToken(extractAndValidateToken(request));
      if (auth == AuthType.OAUTH2) {
        req.setOAuth2Arguments(new OAuth2Arguments(request));
View Full Code Here

TOP

Related Classes of org.apache.shindig.gadgets.AuthType

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.