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

com.zopen.aliyun.vod.dto.AliyunVodStsResp Maven / Gradle / Ivy

There is a newer version: 1.0.5
Show newest version
package com.zopen.aliyun.vod.dto;

import com.aliyuncs.sts.model.v20150401.AssumeRoleResponse;
import com.zopen.ato.properties.AliyunVodProperties;

/**
 * STS临时AK
 *
 * @author [email protected]
 * @since 2020/5/20
 */
public class AliyunVodStsResp {

    private String regionId = AliyunVodProperties.REGION_ID;

    private String securityToken;

    private String accessKeyId;

    private String accessKeySecret;

    public AliyunVodStsResp(AssumeRoleResponse assumeRoleResponse) {
        if (assumeRoleResponse != null && assumeRoleResponse.getCredentials() != null) {
            this.securityToken = assumeRoleResponse.getCredentials().getSecurityToken();
            this.accessKeyId = assumeRoleResponse.getCredentials().getAccessKeyId();
            this.accessKeySecret = assumeRoleResponse.getCredentials().getAccessKeySecret();
        }
    }

    public String getSecurityToken() {
        return securityToken;
    }

    public String getRegionId() {
        return regionId;
    }

    public void setRegionId(String regionId) {
        this.regionId = regionId;
    }

    public void setSecurityToken(String securityToken) {
        this.securityToken = securityToken;
    }

    public String getAccessKeyId() {
        return accessKeyId;
    }

    public void setAccessKeyId(String accessKeyId) {
        this.accessKeyId = accessKeyId;
    }

    public String getAccessKeySecret() {
        return accessKeySecret;
    }

    public void setAccessKeySecret(String accessKeySecret) {
        this.accessKeySecret = accessKeySecret;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy