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

com.aliyun.credentials.AccessKeyCredential Maven / Gradle / Ivy

Go to download

Alibaba Cloud Credentials for Java Copyright (C) Alibaba Cloud Computing All rights reserved. 版权所有 (C)阿里云计算有限公司 https://www.aliyun.com

There is a newer version: 0.3.12
Show newest version
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