All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.davidmoten.aws.lw.client.internal.CredentialsImpl Maven / Gradle / Ivy

Go to download

Lightweight client for all AWS services (but still with useful builders and XML parser)

The newest version!
package com.github.davidmoten.aws.lw.client.internal;

import java.util.Optional;

import com.github.davidmoten.aws.lw.client.Credentials;
import com.github.davidmoten.aws.lw.client.internal.util.Preconditions;

public final class CredentialsImpl implements Credentials {

    private final String accessKey;
    private final String secretKey;
    private final Optional sessionToken;

    public CredentialsImpl(String accessKey, String secretKey, Optional sessionToken) {
        Preconditions.checkNotNull(accessKey);
        Preconditions.checkNotNull(secretKey);
        Preconditions.checkNotNull(sessionToken);
        this.accessKey = accessKey;
        this.secretKey = secretKey;
        this.sessionToken = sessionToken;
    }

    @Override
    public String accessKey() {
        return accessKey;
    }

    @Override
    public String secretKey() {
        return secretKey;
    }

    @Override
    public Optional sessionToken() {
        return sessionToken;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy