com.github.davidmoten.aws.lw.client.internal.CredentialsImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aws-lightweight-client-java Show documentation
Show all versions of aws-lightweight-client-java Show documentation
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