Package org.jets3t.service.security

Examples of org.jets3t.service.security.AWSDevPayCredentials


                    errorMessages += "</ul></html>";

                    ErrorDialog.showDialog(this, null, errorMessages, null);               
                } else {           
                    if (loginCredentialsPanel.getUsingDevPay()) {
                        this.awsCredentials = new AWSDevPayCredentials(
                            loginCredentialsPanel.getAWSAccessKey(),
                            loginCredentialsPanel.getAWSSecretKey(),
                            loginCredentialsPanel.getAWSUserToken(),
                            loginCredentialsPanel.getAWSProductToken(),
                            loginCredentialsPanel.getFriendlyName());
View Full Code Here


        dialog.setVisible(true);
       
        AWSCredentials awsCredentials = null;
        if (dialog.isConfirmed()) {
            if (dialog.getUsingDevPay()) {
                awsCredentials = new AWSDevPayCredentials(
                    dialog.getAWSAccessKey(),
                    dialog.getAWSSecretKey(),
                    dialog.getAWSUserToken(),
                    dialog.getAWSProductToken(),
                    dialog.getFriendlyName());
View Full Code Here

        this.jets3tProperties = jets3tProperties;               
        this.isHttpsOnly = jets3tProperties.getBoolProperty("s3service.https-only", true);       
        this.internalErrorRetryMax = jets3tProperties.getIntProperty("s3service.internal-error-retry-max", 5);
       
        if (awsCredentials instanceof AWSDevPayCredentials) {
            AWSDevPayCredentials awsDevPayCredentials = (AWSDevPayCredentials) awsCredentials;
            this.awsDevPayUserToken = awsDevPayCredentials.getUserToken();
            this.awsDevPayProductToken = awsDevPayCredentials.getProductToken();
        } else {
            this.awsDevPayUserToken = jets3tProperties.getStringProperty("devpay.user-token", null);
            this.awsDevPayProductToken = jets3tProperties.getStringProperty("devpay.product-token", null);
        }
       
View Full Code Here

            uriPath += "?";
        }

        // Include any DevPay tokens in signed request
        if (awsCredentials instanceof AWSDevPayCredentials) {
            AWSDevPayCredentials devPayCredentials = (AWSDevPayCredentials) awsCredentials;
            if (devPayCredentials.getProductToken() != null) {
                String securityToken = devPayCredentials.getUserToken()
                    + "," + devPayCredentials.getProductToken();
                headersMap.put("x-amz-security-token", securityToken);
            } else {
                headersMap.put("x-amz-security-token", devPayCredentials.getUserToken());               
            }
           
            uriPath += "x-amz-security-token="
                RestUtils.encodeUrlString((String) headersMap.get("x-amz-security-token")) + "&";
        }
View Full Code Here

        // Amazon's DevPay service allows vendors to sell user-pays S3 accounts.
        // To access the S3 portions of a DevPay product, JetS3t needs
        // additional credentials that include the DevPay User Token, and the
        // DevPay Product Token.
       
        AWSDevPayCredentials devPayCredentials = new AWSDevPayCredentials(
            "YOUR_AWS_ACCESSS_KEY", "YOUR_AWS_SECRET_KEY",
            "DEVPAY_USER_TOKEN", "DEVPAY_PRODUCT_TOKEN");
       
        // Once you have defined your DevPay S3 credentials, you can create an
        // S3Service class based on these and access the DevPay account as usual.
View Full Code Here

        // Amazon's DevPay service allows vendors to sell user-pays S3 accounts.
        // To access the S3 portions of a DevPay product, JetS3t needs
        // additional credentials that include the DevPay User Token, and the
        // DevPay Product Token.

        AWSDevPayCredentials devPayCredentials = new AWSDevPayCredentials(
            "YOUR_AWS_ACCESSS_KEY", "YOUR_AWS_SECRET_KEY",
            "DEVPAY_USER_TOKEN", "DEVPAY_PRODUCT_TOKEN");

        // Once you have defined your DevPay S3 credentials, you can create an
        // S3Service class based on these and access the DevPay account as usual.
View Full Code Here

                    errorMessages += "</ul></html>";

                    ErrorDialog.showDialog(this, null, errorMessages, null);
                } else {
                    if (loginCredentialsPanel.getUsingDevPay()) {
                        this.credentials = new AWSDevPayCredentials(
                            loginCredentialsPanel.getAccessKey(),
                            loginCredentialsPanel.getSecretKey(),
                            loginCredentialsPanel.getAWSUserToken(),
                            loginCredentialsPanel.getAWSProductToken(),
                            loginCredentialsPanel.getFriendlyName());
View Full Code Here

                    dialog.getFriendlyName());
            }
            // Handle Amazon endpoint
            else {
                if (dialog.getUsingDevPay()) {
                    credentials = new AWSDevPayCredentials(
                        dialog.getAccessKey(),
                        dialog.getSecretKey(),
                        dialog.getAWSUserToken(),
                        dialog.getAWSProductToken(),
                        dialog.getFriendlyName());
View Full Code Here

            uriPath += "?";
        }

        // Include any DevPay tokens in signed request
        if (getProviderCredentials() instanceof AWSDevPayCredentials) {
            AWSDevPayCredentials devPayCredentials = (AWSDevPayCredentials) getProviderCredentials();
            if (devPayCredentials.getProductToken() != null) {
                String securityToken = devPayCredentials.getUserToken()
                    + "," + devPayCredentials.getProductToken();
                headersMap.put(Constants.AMZ_SECURITY_TOKEN, securityToken);
            } else {
                headersMap.put(Constants.AMZ_SECURITY_TOKEN, devPayCredentials.getUserToken());
            }

            uriPath += Constants.AMZ_SECURITY_TOKEN + "=" +
                RestUtils.encodeUrlString((String) headersMap.get(Constants.AMZ_SECURITY_TOKEN)) + "&";
        }
View Full Code Here

        CredentialsProvider credentialsProvider, Jets3tProperties jets3tProperties)
    {
        super(credentials, invokingApplicationDescription, credentialsProvider, jets3tProperties);

        if (credentials instanceof AWSDevPayCredentials) {
            AWSDevPayCredentials awsDevPayCredentials = (AWSDevPayCredentials) credentials;
            this.awsDevPayUserToken = awsDevPayCredentials.getUserToken();
            this.awsDevPayProductToken = awsDevPayCredentials.getProductToken();
        } else {
            this.awsDevPayUserToken = jets3tProperties.getStringProperty("devpay.user-token", null);
            this.awsDevPayProductToken = jets3tProperties.getStringProperty("devpay.product-token", null);
        }
View Full Code Here

TOP

Related Classes of org.jets3t.service.security.AWSDevPayCredentials

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.