Ejemplo n.º 1
0
        public DefaultCredentials(string accessId, string accessKey, string securityToken)
        {
            OssUtils.CheckCredentials(accessId, accessKey);

            AccessId      = accessId;
            AccessKey     = accessKey;
            SecurityToken = securityToken ?? string.Empty;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// creates a instance of <see cref="DefaultCredentials"/>
        /// </summary>
        /// <param name="accessKeyId">OSS access key Id</param>
        /// <param name="accessKeySecret">OSS access secret</param>
        /// <param name="securityToken">STS security token</param>
        public DefaultCredentials(string accessKeyId, string accessKeySecret, string securityToken)
        {
            OssUtils.CheckCredentials(accessKeyId, accessKeySecret);

            AccessKeyId     = accessKeyId.Trim();
            AccessKeySecret = accessKeySecret.Trim();
            SecurityToken   = securityToken ?? string.Empty;
        }
Ejemplo n.º 3
0
        /// <inheritdoc/>
        public void SetCredentials(ICredentials creds)
        {
            if (creds == null)
            {
                throw new ArgumentNullException("creds");
            }

            OssUtils.CheckCredentials(creds.AccessKeyId, creds.AccessKeySecret);
            _creds = creds;
        }