Examples of OAuth2Provider


Examples of com.jetdrone.vertx.yoke.extras.middleware.OAuth2Provider

    @Override
    public void start() {

        Mac mac = Utils.newHmacSHA256("abracadabra");
        OAuth2Provider oauthProvider = new OAuth2Provider("signing-secret");

//oauthProvider.on('authorizeParamMissing', function(req, res, callback) {
//  res.writeHead(400);
//  res.end("missing param");
//});
View Full Code Here

Examples of org.apache.shindig.gadgets.oauth2.persistence.sample.OAuth2Provider

        final JSONObject settings = clients.getJSONObject(clientName);

        final OAuth2Client client = new OAuth2Client(this.encrypter);

        final String providerName = settings.getString(PROVIDER_NAME);
        final OAuth2Provider provider = providers.get(providerName);
        client.setAuthorizationUrl(provider.getAuthorizationUrl());
        client.setClientAuthenticationType(provider.getClientAuthenticationType());
        client.setAuthorizationHeader(provider.isAuthorizationHeader());
        client.setUrlParameter(provider.isUrlParameter());
        client.setTokenUrl(provider.getTokenUrl());

        String redirectUri = settings.optString(OAuth2Message.REDIRECT_URI, null);
        if (redirectUri == null) {
          redirectUri = this.globalRedirectUri;
        }
View Full Code Here

Examples of org.apache.shindig.gadgets.oauth2.persistence.sample.OAuth2Provider

          tokenUrl = tokenUrl.replace("%contextRoot%", this.contextRoot);
          tokenUrl = tokenUrl.replace("%origin%", this.authority.getOrigin());
          tokenUrl = tokenUrl.replace("%scheme%", this.authority.getScheme());
        }

        final OAuth2Provider oauth2Provider = new OAuth2Provider();

        oauth2Provider.setName(providerName);
        oauth2Provider.setAuthorizationUrl(authorizationUrl);
        oauth2Provider.setTokenUrl(tokenUrl);
        oauth2Provider.setClientAuthenticationType(clientAuthenticationType);
        oauth2Provider.setAuthorizationHeader(authorizationHeader);
        oauth2Provider.setUrlParameter(urlParameter);

        ret.put(oauth2Provider.getName(), oauth2Provider);
      }
    } catch (final JSONException e) {
      LOG.logp(Level.WARNING, CLAZZ, method, "Exception parsing providers.", e);
      throw new OAuth2PersistenceException(e);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.