
com.aliyun.credentials.AccessKeyCredential Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of credentials-java Show documentation
Show all versions of credentials-java Show documentation
Alibaba Cloud Credentials for Java
Copyright (C) Alibaba Cloud Computing
All rights reserved.
版权所有 (C)阿里云计算有限公司
https://www.aliyun.com
package com.aliyun.credentials;
import com.aliyun.credentials.utils.AuthConstant;
@Deprecated
public class AccessKeyCredential implements AlibabaCloudCredentials {
private final String accessKeyId;
private final String accessKeySecret;
public AccessKeyCredential(String accessKeyId, String accessKeySecret) {
if (accessKeyId == null) {
throw new IllegalArgumentException("Access key ID cannot be null.");
}
if (accessKeySecret == null) {
throw new IllegalArgumentException("Access key secret cannot be null.");
}
this.accessKeyId = accessKeyId;
this.accessKeySecret = accessKeySecret;
}
@Override
public String getAccessKeyId() {
return accessKeyId;
}
@Override
public String getAccessKeySecret() {
return accessKeySecret;
}
@Override
public String getSecurityToken() {
return null;
}
@Override
public String getType() {
return AuthConstant.ACCESS_KEY;
}
@Override
public String getBearerToken() {
return null;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy